--- 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',