Mercurial > evolve
changeset 5571:b2de5825e5ca
evolve: don't set evolved node as dirstate p2
Upstream rebase changed in 9c9cfecd4600 (rebase: don't use rebased
node as dirstate p2 (BC), 2020-01-10) so the dirstate parents are
always the commits that will be parents once the commit has been
created. Let's follow their lead so the experience is consistent.
The drawback is that users who use Evolve with older Mercurial
versions will not see in `hg log -G` output which commit is being
evolved.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 25 Sep 2020 11:06:46 -0700 |
parents | 15cc99069c57 |
children | d7d954b6d518 |
files | CHANGELOG hgext3rd/evolve/evolvecmd.py tests/test-evolve-abort-orphan.t tests/test-evolve-abort-phasediv.t tests/test-evolve-phase.t tests/test-evolve.t tests/test-stabilize-conflict.t |
diffstat | 7 files changed, 12 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGELOG Thu Sep 17 21:19:13 2020 +0200 +++ b/CHANGELOG Fri Sep 25 11:06:46 2020 -0700 @@ -8,6 +8,9 @@ * metaedit: update bookmark location when applicable * evolve: fix various issues with --continue when solving content-divergence * rewind: add a --dry-run flag + * evolve: while resolving conflicts, the evolved node will no longer be a + dirstate parent (won't show up in `hg parents` and not as `@` in `hg log -G`, + but it will show up as `%` with hg >= 5.4) topic (0.20.0)
--- a/hgext3rd/evolve/evolvecmd.py Thu Sep 17 21:19:13 2020 +0200 +++ b/hgext3rd/evolve/evolvecmd.py Fri Sep 25 11:06:46 2020 -0700 @@ -949,9 +949,6 @@ assert tr is not None r = _evolvemerge(repo, orig, dest, pctx, keepbranch) if r.unresolvedcount: # some conflict - with repo.dirstate.parentchange(), compat.parentchange(repo): - repo.setparents(dest.node(), orig.node()) - repo.dirstate.write(tr) hint = _(b"see 'hg help evolve.interrupted'") raise error.InterventionRequired(_(b"unresolved merge conflicts"), hint=hint)
--- a/tests/test-evolve-abort-orphan.t Thu Sep 17 21:19:13 2020 +0200 +++ b/tests/test-evolve-abort-orphan.t Fri Sep 25 11:06:46 2020 -0700 @@ -111,12 +111,6 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: added c - changeset: 4:c41c793e0ef1 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - instability: orphan - summary: added d - #if abortcommand when in dry-run mode $ hg abort --dry-run @@ -209,7 +203,7 @@ | () draft | * 6:e83de241f751 added d | | () draft - | @ 5:e93a9161a274 added c + | % 5:e93a9161a274 added c | | () draft | x 2:b1661037fa25 added b | | () draft @@ -303,7 +297,7 @@ |/ () draft @ 7:807e8e2ca559 added a | () draft - | @ 6:8f20d4390c21 foo to a + | % 6:8f20d4390c21 foo to a | | () draft | | * 5:bcb1c47f8520 added d | | | () draft @@ -367,7 +361,7 @@ |/ () draft @ 7:807e8e2ca559 added a | () draft - | @ 6:8f20d4390c21 foo to a + | % 6:8f20d4390c21 foo to a | | () draft | | * 5:bcb1c47f8520 added d | | | () draft @@ -452,7 +446,7 @@ |/ () draft @ 7:807e8e2ca559 added a | () draft - | @ 6:8f20d4390c21 foo to a + | % 6:8f20d4390c21 foo to a | | () draft | x 1:2f913b0c9220 added a |/ () draft @@ -520,7 +514,7 @@ | (bm1) draft o 4:a0086c17bfc7 added a | () draft - | @ 3:17509928e5bf added c + | % 3:17509928e5bf added c | | () draft | x 2:9f0c80a55ddc added b | | () draft
--- a/tests/test-evolve-abort-phasediv.t Thu Sep 17 21:19:13 2020 +0200 +++ b/tests/test-evolve-abort-phasediv.t Fri Sep 25 11:06:46 2020 -0700 @@ -123,14 +123,6 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: added c - changeset: 6:ddba58020bc0 - tag: tip - parent: 1:c7586e2a9264 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - instability: phase-divergent - summary: added d - $ hg abort evolve aborted
--- a/tests/test-evolve-phase.t Thu Sep 17 21:19:13 2020 +0200 +++ b/tests/test-evolve-phase.t Fri Sep 25 11:06:46 2020 -0700 @@ -103,7 +103,7 @@ $ hg glog @ 3 - 87495ea7c9ec b (draft) | - | @ 2 - 13833940840c c (secret) + | % 2 - 13833940840c c (secret) | | | x 1 - 1e6c11564562 b (draft) |/
--- a/tests/test-evolve.t Thu Sep 17 21:19:13 2020 +0200 +++ b/tests/test-evolve.t Fri Sep 25 11:06:46 2020 -0700 @@ -1401,7 +1401,7 @@ | o 32:6ec468e4cb98@default(draft) amended | - | @ 31:5be050657ca5@default(draft) will cause conflict at evolve + | % 31:5be050657ca5@default(draft) will cause conflict at evolve | | | x 30:748126f98ff1@default(draft) will be evolved safely | |
--- a/tests/test-stabilize-conflict.t Thu Sep 17 21:19:13 2020 +0200 +++ b/tests/test-stabilize-conflict.t Fri Sep 25 11:06:46 2020 -0700 @@ -141,7 +141,7 @@ | date: Thu Jan 01 00:00:00 1970 +0000 | summary: babar count up to ten | - | @ changeset: 4:71c18f70c34f + | % changeset: 4:71c18f70c34f | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | instability: orphan @@ -234,7 +234,7 @@ | date: Thu Jan 01 00:00:00 1970 +0000 | summary: babar count up to ten | - | @ changeset: 6:1836b91c6c1d + | % changeset: 6:1836b91c6c1d | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | instability: orphan