Patchwork D7083: fix: don't pass in default value when looking up config

login
register
mail settings
Submitter phabricator
Date Oct. 14, 2019, 6:39 a.m.
Message ID <differential-rev-PHID-DREV-rpcuatqne2ts54ubgpuo-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42312/
State Superseded
Headers show

Comments

phabricator - Oct. 14, 2019, 6:39 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The defaults are now registered correctly so we don't need to pass in
  the default value when we look up a config value.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7083

AFFECTED FILES
  hgext/fix.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/fix.py b/hgext/fix.py
--- a/hgext/fix.py
+++ b/hgext/fix.py
@@ -794,11 +794,11 @@ 
     fixers = {}
     for name in fixernames(ui):
         fixers[name] = Fixer()
-        for key, default in FIXER_ATTRS.items():
+        for key in FIXER_ATTRS:
             setattr(
                 fixers[name],
                 pycompat.sysstr(b'_' + key),
-                ui.config(b'fix', name + b':' + key, default),
+                ui.config(b'fix', name + b':' + key),
             )
         fixers[name]._priority = int(fixers[name]._priority)
         fixers[name]._metadata = stringutil.parsebool(fixers[name]._metadata)