hgext/mq.py
changeset 28313 aa73d6a5d9ea
parent 27919 db24d6888896
child 28394 dcb4209bd30d
--- a/hgext/mq.py	Sat Jan 09 20:04:03 2016 +0900
+++ b/hgext/mq.py	Fri Jan 01 22:16:25 2016 +0900
@@ -3560,12 +3560,11 @@
     entry = extensions.wrapcommand(commands.table, 'init', mqinit)
     entry[1].extend(mqopt)
 
-    nowrap = set(commands.norepo.split(" "))
-
     def dotable(cmdtable):
-        for cmd in cmdtable.keys():
+        for cmd, entry in cmdtable.iteritems():
             cmd = cmdutil.parsealiases(cmd)[0]
-            if cmd in nowrap:
+            func = entry[0]
+            if func.norepo:
                 continue
             entry = extensions.wrapcommand(cmdtable, cmd, mqcommand)
             entry[1].extend(mqopt)