##// END OF EJS Templates
fix: fix registration of config item defaults...
Martin von Zweigbergk -
r43488:5cb3e6f4 default
parent child Browse files
Show More
@@ -178,7 +178,7 b' FIXER_ATTRS = {'
178 }
178 }
179
179
180 for key, default in FIXER_ATTRS.items():
180 for key, default in FIXER_ATTRS.items():
181 configitem(b'fix', b'.*(:%s)?' % key, default=default, generic=True)
181 configitem(b'fix', b'.*:%s$' % key, default=default, generic=True)
182
182
183 # A good default size allows most source code files to be fixed, but avoids
183 # A good default size allows most source code files to be fixed, but avoids
184 # letting fixer tools choke on huge inputs, which could be surprising to the
184 # letting fixer tools choke on huge inputs, which could be surprising to the
@@ -794,12 +794,11 b' def getfixers(ui):'
794 fixers = {}
794 fixers = {}
795 for name in fixernames(ui):
795 for name in fixernames(ui):
796 fixers[name] = Fixer()
796 fixers[name] = Fixer()
797 attrs = ui.configsuboptions(b'fix', name)[1]
798 for key, default in FIXER_ATTRS.items():
797 for key, default in FIXER_ATTRS.items():
799 setattr(
798 setattr(
800 fixers[name],
799 fixers[name],
801 pycompat.sysstr(b'_' + key),
800 pycompat.sysstr(b'_' + key),
802 attrs.get(key, default),
801 ui.config(b'fix', name + b':' + key, default),
803 )
802 )
804 fixers[name]._priority = int(fixers[name]._priority)
803 fixers[name]._priority = int(fixers[name]._priority)
805 fixers[name]._metadata = stringutil.parsebool(fixers[name]._metadata)
804 fixers[name]._metadata = stringutil.parsebool(fixers[name]._metadata)
General Comments 0
You need to be logged in to leave comments. Login now