hgext3rd/topic/__init__.py
branchstable
changeset 2464 2b53a2a21bbb
parent 2428 7c15b494bacc
child 2624 fd602980f7ee
--- a/hgext3rd/topic/__init__.py	Sun May 21 23:56:33 2017 +0200
+++ b/hgext3rd/topic/__init__.py	Mon May 22 14:57:47 2017 +0200
@@ -69,6 +69,7 @@
     obsolete,
     patch,
     phases,
+    registrar,
     util,
 )
 
@@ -81,8 +82,13 @@
     discovery,
 )
 
+if util.safehasattr(registrar, 'command'):
+    commandfunc = registrar.command
+else: # compat with hg < 4.3
+    commandfunc = cmdutil.command
+
 cmdtable = {}
-command = cmdutil.command(cmdtable)
+command = commandfunc(cmdtable)
 colortable = {'topic.active': 'green',
               'topic.list.troubledcount': 'red',
               'topic.list.headcount.multiple': 'yellow',