changeset 19536:ab3cf67740d6

ui.config: fix bug in config alternatives from cc669e4fec95
author Augie Fackler <durin42@gmail.com>
date Wed, 24 Jul 2013 19:13:39 -0400
parents df2155ebf502
children 6e3e8575276d
files mercurial/ui.py
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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):