hgext3rd/topic/flow.py
changeset 4245 419801742d08
parent 3282 3675fe74521d
child 4263 35130e428ebd
--- a/hgext3rd/topic/flow.py	Mon Nov 05 16:04:01 2018 +0800
+++ b/hgext3rd/topic/flow.py	Sun Nov 04 22:06:23 2018 +0800
@@ -87,8 +87,9 @@
 
 def installpushflag(ui):
     entry = extensions.wrapcommand(commands.table, 'push', wrappush)
-    entry[1].append(('', 'publish', False,
-                    _('push the changeset as public')))
+    if not any(opt for opt in entry[1] if opt[1] == 'publish'): # hg <= 4.9
+        entry[1].append(('', 'publish', False,
+                         _('push the changeset as public')))
     extensions.wrapfunction(exchange.pushoperation, '__init__',
                             extendpushoperation)
     extensions.wrapfunction(exchange, '_pushdiscoveryphase', wrapphasediscovery)