4dddc56c4c4b — Kevin Bullock 6 years ago
Use @registrar.command where available (hg 3.7+).
1 files changed, 6 insertions(+), 1 deletions(-)

M prompt.py
M prompt.py +6 -1
@@ 20,8 20,13 @@ from mercurial import extensions, comman
 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 :