changeset 41045:c1476d095d57

exthelper: simplify configitem registration
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 22 Dec 2018 22:26:36 -0500
parents fe606f2dcae9
children f5ec93f69171
files mercurial/exthelper.py
diffstat 1 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exthelper.py	Sat Dec 22 21:06:24 2018 -0500
+++ b/mercurial/exthelper.py	Sat Dec 22 22:26:36 2018 -0500
@@ -13,7 +13,6 @@
 
 from . import (
     commands,
-    configitems,
     extensions,
     fileset as filesetmod,
     registrar,
@@ -54,12 +53,7 @@
             self.command._doregister = _newdoregister
 
         self.configtable = {}
-        self._configitem = registrar.configitem(self.configtable)
-
-    def configitem(self, section, config, default=configitems.dynamicdefault):
-        """Register a config item.
-        """
-        self._configitem(section, config, default=default)
+        self.configitem = registrar.configitem(self.configtable)
 
     def merge(self, other):
         self._uicallables.extend(other._uicallables)