Mercurial > hg > mercurial-crew
comparison hgext/rebase.py @ 17988:848345a8d6ad stable
rebase: fix pull --rev options clashing with --rebase (issue3619)
Rebase also have a plain `--rev` option used to select the rebase set (as
`--base` or `--source` would). But the content of the --rev option was intended
for the remote repo and is irrelevant for the local rebase operation. We expect
`hg pull --rebase` to stick with the default behavior here:
hg rebase --base . --dest tip(branch(.))
The `rev` option is dropped from the option passed to rebase.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Thu, 29 Nov 2012 16:37:15 +0100 |
parents | 9e2dc0d292cd |
children | e8c9b13c7799 |
comparison
equal
deleted
inserted
replaced
17985:f94ead934067 | 17988:848345a8d6ad |
---|---|
704 orig(ui, repo, *args, **opts) | 704 orig(ui, repo, *args, **opts) |
705 finally: | 705 finally: |
706 commands.postincoming = origpostincoming | 706 commands.postincoming = origpostincoming |
707 revspostpull = len(repo) | 707 revspostpull = len(repo) |
708 if revspostpull > revsprepull: | 708 if revspostpull > revsprepull: |
709 # --rev option from pull conflict with rebase own --rev | |
710 # dropping it | |
711 if 'rev' in opts: | |
712 del opts['rev'] | |
709 rebase(ui, repo, **opts) | 713 rebase(ui, repo, **opts) |
710 branch = repo[None].branch() | 714 branch = repo[None].branch() |
711 dest = repo[branch].rev() | 715 dest = repo[branch].rev() |
712 if dest != repo['.'].rev(): | 716 if dest != repo['.'].rev(): |
713 # there was nothing to rebase we force an update | 717 # there was nothing to rebase we force an update |