hgext/fix.py
changeset 43217 5cb3e6f4e069
parent 43193 2d1f9880af1b
child 43218 f4c1fd6addd5
--- a/hgext/fix.py	Sat Oct 12 12:41:53 2019 -0700
+++ b/hgext/fix.py	Sat Oct 12 11:13:55 2019 -0700
@@ -178,7 +178,7 @@
 }
 
 for key, default in FIXER_ATTRS.items():
-    configitem(b'fix', b'.*(:%s)?' % key, default=default, generic=True)
+    configitem(b'fix', b'.*:%s$' % key, default=default, generic=True)
 
 # A good default size allows most source code files to be fixed, but avoids
 # letting fixer tools choke on huge inputs, which could be surprising to the
@@ -794,12 +794,11 @@
     fixers = {}
     for name in fixernames(ui):
         fixers[name] = Fixer()
-        attrs = ui.configsuboptions(b'fix', name)[1]
         for key, default in FIXER_ATTRS.items():
             setattr(
                 fixers[name],
                 pycompat.sysstr(b'_' + key),
-                attrs.get(key, default),
+                ui.config(b'fix', name + b':' + key, default),
             )
         fixers[name]._priority = int(fixers[name]._priority)
         fixers[name]._metadata = stringutil.parsebool(fixers[name]._metadata)