mercurial/ui.py
changeset 32985 28a65fd4b359
parent 32984 6d983e8af49c
child 32989 149b68224b08
--- a/mercurial/ui.py	Sat Jun 17 18:43:27 2017 +0200
+++ b/mercurial/ui.py	Sat Jun 17 12:15:28 2017 +0200
@@ -439,11 +439,17 @@
         return self._data(untrusted).source(section, name)
 
     def config(self, section, name, default=_unset, untrusted=False):
-        if default is _unset:
-            default = None
         if isinstance(name, list):
             alternates = name
+            # let us ignore the config items in the alternates case for now
+            if default is _unset:
+                default = None
         else:
+            if default is _unset:
+                default = None
+                item = self._knownconfig.get(section, {}).get(name)
+                if item is not None:
+                    default = item.default
             alternates = [name]
 
         for n in alternates: