Mercurial > hg
diff hgext/rebase.py @ 44556:f63598aa1c4b
rebase: accept multiple --base arguments (BC)
Same reasoning as for the previous patch. Rebase has worked well with
`--base 'A + B'` since 51e7c83e05ee (rebase: calculate ancestors for
--base separately (issue5420), 2016-11-28).
Differential Revision: https://phab.mercurial-scm.org/D8293
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 13 Mar 2020 16:57:38 -0700 |
parents | 05654ea5137c |
children | e7af56a0733e |
line wrap: on
line diff
--- a/hgext/rebase.py Fri Mar 13 16:39:32 2020 -0700 +++ b/hgext/rebase.py Fri Mar 13 16:57:38 2020 -0700 @@ -822,7 +822,7 @@ ( b'b', b'base', - b'', + [], _(b'rebase everything from branching point of specified changeset'), _(b'REV'), ), @@ -871,7 +871,7 @@ + cmdutil.dryrunopts + cmdutil.formatteropts + cmdutil.confirmopts, - _(b'[[-s REV]... | -b REV | [-r REV]...] [-d REV] [OPTION]...'), + _(b'[[-s REV]... | [-b REV]... | [-r REV]...] [-d REV] [OPTION]...'), helpcategory=command.CATEGORY_CHANGE_MANAGEMENT, ) def rebase(ui, repo, **opts): @@ -1187,7 +1187,7 @@ inmemory, opts.get(b'dest', None), opts.get(b'source', []), - opts.get(b'base', None), + opts.get(b'base', []), opts.get(b'rev', []), destspace=destspace, ) @@ -1250,7 +1250,7 @@ # `+ (%ld)` to work around `wdir()::` being empty rebaseset = repo.revs(b'(%ld):: + (%ld)', src, src) else: - base = scmutil.revrange(repo, [basef or b'.']) + base = scmutil.revrange(repo, basef or [b'.']) if not base: ui.status( _(b'empty "base" revision set - ' b"can't compute rebase set\n")