ui.config: fix bug in config alternatives from cc669e4fec95
authorAugie Fackler <durin42@gmail.com>
Wed, 24 Jul 2013 19:13:39 -0400
changeset 19536 ab3cf67740d6
parent 19535 df2155ebf502
child 19537 6e3e8575276d
ui.config: fix bug in config alternatives from cc669e4fec95
mercurial/ui.py
--- a/mercurial/ui.py	Sat Aug 03 13:23:48 2013 -0500
+++ b/mercurial/ui.py	Wed Jul 24 19:13:39 2013 -0400
@@ -176,7 +176,7 @@
             alternates = [name]
 
         for n in alternates:
-            value = self._data(untrusted).get(section, name, None)
+            value = self._data(untrusted).get(section, n, None)
             if value is not None:
                 name = n
                 break
@@ -184,10 +184,11 @@
             value = default
 
         if self.debugflag and not untrusted and self._reportuntrusted:
-            uvalue = self._ucfg.get(section, name)
-            if uvalue is not None and uvalue != value:
-                self.debug("ignoring untrusted configuration option "
-                           "%s.%s = %s\n" % (section, name, uvalue))
+            for n in alternates:
+                uvalue = self._ucfg.get(section, n)
+                if uvalue is not None and uvalue != value:
+                    self.debug("ignoring untrusted configuration option "
+                               "%s.%s = %s\n" % (section, n, uvalue))
         return value
 
     def configpath(self, section, name, default=None, untrusted=False):