Mercurial > evolve
comparison hgext3rd/topic/flow.py @ 4245:419801742d08
topic: only add --publish flag to push if it's not already there
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sun, 04 Nov 2018 22:06:23 +0800 |
parents | 3675fe74521d |
children | 35130e428ebd |
comparison
equal
deleted
inserted
replaced
4244:0e266166457f | 4245:419801742d08 |
---|---|
85 future = list(unfi.set(revset, pushop.futureheads, droots)) | 85 future = list(unfi.set(revset, pushop.futureheads, droots)) |
86 pushop.outdatedphases = future | 86 pushop.outdatedphases = future |
87 | 87 |
88 def installpushflag(ui): | 88 def installpushflag(ui): |
89 entry = extensions.wrapcommand(commands.table, 'push', wrappush) | 89 entry = extensions.wrapcommand(commands.table, 'push', wrappush) |
90 entry[1].append(('', 'publish', False, | 90 if not any(opt for opt in entry[1] if opt[1] == 'publish'): # hg <= 4.9 |
91 _('push the changeset as public'))) | 91 entry[1].append(('', 'publish', False, |
92 _('push the changeset as public'))) | |
92 extensions.wrapfunction(exchange.pushoperation, '__init__', | 93 extensions.wrapfunction(exchange.pushoperation, '__init__', |
93 extendpushoperation) | 94 extendpushoperation) |
94 extensions.wrapfunction(exchange, '_pushdiscoveryphase', wrapphasediscovery) | 95 extensions.wrapfunction(exchange, '_pushdiscoveryphase', wrapphasediscovery) |
95 exchange.pushdiscoverymapping['phase'] = exchange._pushdiscoveryphase | 96 exchange.pushdiscoverymapping['phase'] = exchange._pushdiscoveryphase |