Patchwork [2,of,7,evolve-ext] exthelper: simplify configitem registration

login
register
mail settings
Submitter Matt Harbison
Date Jan. 3, 2019, 5:30 a.m.
Message ID <708bf337a93e8e136fdf.1546493449@Envy>
Download mbox | patch
Permalink /patch/37432/
State Accepted
Headers show

Comments

Matt Harbison - Jan. 3, 2019, 5:30 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1545535596 18000
#      Sat Dec 22 22:26:36 2018 -0500
# Node ID 708bf337a93e8e136fdf25aabf927ee44f3460ad
# Parent  f208ece681e49dca806e2a30322b1126aeb847d1
exthelper: simplify configitem registration

Patch

diff --git a/hgext3rd/evolve/exthelper.py b/hgext3rd/evolve/exthelper.py
--- a/hgext3rd/evolve/exthelper.py
+++ b/hgext3rd/evolve/exthelper.py
@@ -11,7 +11,6 @@ 
 
 from mercurial import (
     commands,
-    configitems,
     extensions,
     fileset as filesetmod,
     registrar,
@@ -52,12 +51,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)