mercurial/configitems.py
changeset 34874 e3fbf8e3fef2
parent 34872 29f52e7966dd
child 34875 4f0d4bc63b8a
--- a/mercurial/configitems.py	Wed Oct 18 15:38:51 2017 +0200
+++ b/mercurial/configitems.py	Wed Oct 18 12:26:08 2017 +0200
@@ -67,8 +67,9 @@
             self._generics.add(item)
 
     def get(self, key):
-        if key in self:
-            return self[key]
+        baseitem = super(itemregister, self).get(key)
+        if baseitem is not None and not baseitem.generic:
+            return baseitem
 
         # search for a matching generic item
         generics = sorted(self._generics, key=(lambda x: (x.priority, x.name)))
@@ -76,8 +77,7 @@
             if item._re.match(key):
                 return item
 
-        # fallback to dict get
-        return super(itemregister, self).get(key)
+        return None
 
 coreitems = {}