# HG changeset patch # User Kevin Bullock # Date 1508514713 18000 # Node ID 4dddc56c4c4b420c91d4a9b20e8f9589953b3fde # Parent 5334581e231a5167d03689ff47b3a6fdf082011c Use @registrar.command where available (hg 3.7+). diff -r 5334581e231a -r 4dddc56c4c4b prompt.py --- a/prompt.py Wed Oct 05 20:52:29 2016 +0000 +++ b/prompt.py Fri Oct 20 10:51:53 2017 -0500 @@ -20,8 +20,13 @@ from mercurial.i18n import _ from mercurial.node import hex, short +# command registration moved into `registrar` module in v3.7. cmdtable = {} -command = cmdutil.command(cmdtable) +try: + from mercurial import registrar + command = registrar.command(cmdtable) +except ImportError: + command = cmdutil.command(cmdtable) # `revrange' has been moved into module `scmutil' since v1.9. try :