# HG changeset patch # User Durham Goode # Date 1495493154 25200 # Node ID f2118a7dd764c2680078bb2133b04a101549ff8a # Parent d356f84792955fe8e9f4afd86d6b479ce300edec commands: update to use registrar Core hg has deprecated cmdutil.commands in favor of registrar.commands. So we need to update hg-git as well. diff --git a/hggit/__init__.py b/hggit/__init__.py --- a/hggit/__init__.py +++ b/hggit/__init__.py @@ -84,7 +84,11 @@ buglink = 'https://bitbucket.org/durin42/hg-git/issues' cmdtable = {} -command = cmdutil.command(cmdtable) +try: + from mercurial import registrar + command = registrar.command(cmdtable) +except (ImportError, AttributeError): + command = cmdutil.command(cmdtable) # support for `hg clone git://github.com/defunkt/facebox.git` # also hg clone git+ssh://git@github.com/schacon/simplegit.git diff --git a/tests/commitextra.py b/tests/commitextra.py --- a/tests/commitextra.py +++ b/tests/commitextra.py @@ -3,7 +3,11 @@ from mercurial import cmdutil, commands, scmutil cmdtable = {} -command = cmdutil.command(cmdtable) +try: + from mercurial import registrar + command = registrar.command(cmdtable) +except (ImportError, AttributeError): + command = cmdutil.command(cmdtable) testedwith = 'internal' @command('commitextra',