changeset 38001:fb0de0bcd297

cmdutil: drop deprecated precursor of registrar.command (API)
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 10 May 2018 21:53:48 -0400
parents f1f8b655da32
children 14f4449711b8
files mercurial/cmdutil.py mercurial/extensions.py tests/test-extension.t
diffstat 3 files changed, 0 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Fri May 11 00:53:29 2018 -0400
+++ b/mercurial/cmdutil.py	Thu May 10 21:53:48 2018 -0400
@@ -37,7 +37,6 @@
     patch,
     pathutil,
     pycompat,
-    registrar,
     revlog,
     rewriteutil,
     scmutil,
@@ -3151,12 +3150,6 @@
         if f in copied:
             repo.dirstate.copy(copied[f], f)
 
-class command(registrar.command):
-    """deprecated: used registrar.command instead"""
-    def _doregister(self, func, name, *args, **kwargs):
-        func._deprecatedregistrar = True  # flag for deprecwarn in extensions.py
-        return super(command, self)._doregister(func, name, *args, **kwargs)
-
 # a list of (ui, repo, otherpeer, opts, missing) functions called by
 # commands.outgoing.  "missing" is "missing" of the result of
 # "findcommonoutgoing()"
--- a/mercurial/extensions.py	Fri May 11 00:53:29 2018 -0400
+++ b/mercurial/extensions.py	Thu May 10 21:53:48 2018 -0400
@@ -145,9 +145,6 @@
     """Check if extension commands have required attributes"""
     for c, e in cmdtable.iteritems():
         f = e[0]
-        if getattr(f, '_deprecatedregistrar', False):
-            ui.deprecwarn("cmdutil.command is deprecated, use "
-                          "registrar.command to register '%s'" % c, '4.6')
         missing = [a for a in _cmdfuncattrs if not util.safehasattr(f, a)]
         if not missing:
             continue
--- a/tests/test-extension.t	Fri May 11 00:53:29 2018 -0400
+++ b/tests/test-extension.t	Thu May 10 21:53:48 2018 -0400
@@ -1697,10 +1697,6 @@
   >     pass
   > EOF
 
-  $ hg --config extensions.nonregistrar=`pwd`/nonregistrar.py version > /dev/null
-  devel-warn: cmdutil.command is deprecated, use registrar.command to register 'foo'
-  (compatibility will be dropped after Mercurial-4.6, update your code.) * (glob)
-
 Prohibit the use of unicode strings as the default value of options
 
   $ hg init $TESTTMP/opt-unicode-default