exthelper: drop compatibility layer for `command`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 18 Aug 2018 01:06:30 +0200
changeset 3972 f715dcea5086
parent 3971 9f8b99b3d9b5
child 3973 1094e56d369a
exthelper: drop compatibility layer for `command` We dropped support for 4.2.
hgext3rd/evolve/exthelper.py
--- a/hgext3rd/evolve/exthelper.py	Sat Aug 18 01:05:00 2018 +0200
+++ b/hgext3rd/evolve/exthelper.py	Sat Aug 18 01:06:30 2018 +0200
@@ -11,12 +11,6 @@
     util,
 )
 
-if util.safehasattr(registrar, 'command'):
-    command = registrar.command
-else: # compat with hg < 4.3
-    from mercurial import cmdutil
-    command = cmdutil.command
-
 configitem = None
 dynamicdefault = None
 if util.safehasattr(registrar, 'configitem'):
@@ -44,7 +38,7 @@
         self._functionwrappers = []
         self._duckpunchers = []
         self.cmdtable = {}
-        self.command = command(self.cmdtable)
+        self.command = registrar.command(self.cmdtable)
 
         self.configtable = {}
         self._configitem = None