From patchwork Sat Mar 14 09:33:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D8293: rebase: accept multiple --base arguments (BC) From: phabricator X-Patchwork-Id: 45793 Message-Id: <25b5fd1aa6034f4f2b08745bef61fba6@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Sat, 14 Mar 2020 09:33:00 +0000 Closed by commit rHGf63598aa1c4b: rebase: accept multiple --base arguments (BC) (authored by martinvonz). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8293?vs=20792&id=20796 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8293/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8293 AFFECTED FILES hgext/rebase.py relnotes/next tests/test-rebase-dest.t CHANGE DETAILS To: martinvonz, #hg-reviewers, mharbison72, pulkit Cc: mharbison72, mercurial-devel diff --git a/tests/test-rebase-dest.t b/tests/test-rebase-dest.t --- a/tests/test-rebase-dest.t +++ b/tests/test-rebase-dest.t @@ -156,7 +156,7 @@ Multiple destinations cannot be used with --base: - $ rebasewithdag -b B+E -d 'SRC^^' --collapse <<'EOS' + $ rebasewithdag -b B -b E -d 'SRC^^' --collapse <<'EOS' > B E > | | > A D diff --git a/relnotes/next b/relnotes/next --- a/relnotes/next +++ b/relnotes/next @@ -58,12 +58,12 @@ can use the new `conflictparents()` revset for finding the other parent during a conflict. - * `hg rebase` now accepts repeated `--source` arguments. For example, - `hg rebase --source 'A + B'` is equivalent to `hg rebase --source A - --source B`. This is a backwards-incompatible change because it - will break overriding an alias `myrebase = rebase --source A` by - `hg myrebase --source B` (it will now rebase `(A + B)::` instead of - `B::`). + * `hg rebase` now accepts repeated `--source` and `--base` + arguments. For example, `hg rebase --source 'A + B'` is equivalent + to `hg rebase --source A --source B`. This is a + backwards-incompatible change because it will break overriding an + alias `myrebase = rebase --source A` by `hg myrebase --source B` + (it will now rebase `(A + B)::` instead of `B::`). * `hg recover` does not verify the validity of the whole repository anymore. You can pass `--verify` or call `hg verify` if necessary. diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -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")