mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
pushrebase: skip adding --to option to push command if it already exists
Summary: pushrebase extension adds the --to option to push command if the remotenames extension is not loaded. This is not a robust enough check as other extensions like infinitepush can also add the --to option leading to duplicate options. This commit addresses the same. Test Plan: Ran all the tests. Reviewers: rmcelroy, #mercurial, #sourcecontrol Reviewed By: rmcelroy Differential Revision: https://phabricator.intern.facebook.com/D6691642 Signature: 6691642:1515578521:9f783df23df9fa8d3291a6f050cc1d5b6e5dd2fa
This commit is contained in:
parent
8159540c93
commit
e803561cdc
@ -89,10 +89,8 @@ def uisetup(ui):
|
||||
|
||||
def extsetup(ui):
|
||||
entry = wrapcommand(commands.table, 'push', _push)
|
||||
try:
|
||||
# Don't add the 'to' arg if it already exists
|
||||
extensions.find('remotenames')
|
||||
except KeyError:
|
||||
# Don't add the 'to' arg if it already exists
|
||||
if not any(a for a in entry[1] if a[1] == 'to'):
|
||||
entry[1].append(('', 'to', '', _('server revision to rebase onto')))
|
||||
|
||||
partorder = exchange.b2partsgenorder
|
||||
|
Loading…
Reference in New Issue
Block a user