--- a/tests/test-evolve-orphan-merge.t Wed Mar 11 16:11:04 2020 +0700
+++ b/tests/test-evolve-orphan-merge.t Thu Mar 12 06:18:44 2020 +0100
@@ -1,5 +1,6 @@
** Testing resolution of orphans by `hg evolve` when merges are involved **
+ $ . $TESTDIR/testlib/common.sh
$ cat >> $HGRCPATH <<EOF
> [ui]
> interactive = True
@@ -585,3 +586,91 @@
| () draft
o 0:8fa14d15e168 added hgignore
() draft
+
+ $ cd ..
+ $ hg init pruned_merge_pruned_left
+ $ cd pruned_merge_pruned_left
+
+ $ mkcommit base
+ $ mkcommit a
+ $ hg up 0 -q
+ $ mkcommit b
+ created new head
+ $ hg up 1 -q
+ $ hg merge 2 -q
+ $ hg ci -m merge
+ $ mkcommit c
+
+ $ hg prune 3
+ 1 changesets pruned
+ 1 new orphan changesets
+ $ hg prune 2
+ 1 changesets pruned
+
+ $ hg glog
+ @ 4:a3a0811688b4 c
+ | () draft
+ x 3:1ed5adcc2e8b merge
+ |\ () draft
+ | x 2:87fc619cd5f8 b
+ | | () draft
+ o | 1:c604726e05fb a
+ |/ () draft
+ o 0:d20a80d4def3 base
+ () draft
+ $ hg evolve -r 4
+ move:[4] c
+ atop:[1] a
+ working directory is now at f8447023939d
+
+ $ hg glog
+ @ 5:f8447023939d c
+ | () draft
+ o 1:c604726e05fb a
+ | () draft
+ o 0:d20a80d4def3 base
+ () draft
+
+ $ cd ..
+ $ hg init pruned_merge_pruned_right
+ $ cd pruned_merge_pruned_right
+
+ $ mkcommit base
+ $ mkcommit a
+ $ hg up 0 -q
+ $ mkcommit b
+ created new head
+ $ hg up 1 -q
+ $ hg merge 2 -q
+ $ hg ci -m merge
+ $ mkcommit c
+
+ $ hg prune 3
+ 1 changesets pruned
+ 1 new orphan changesets
+ $ hg prune 1
+ 1 changesets pruned
+
+ $ hg glog
+ @ 4:a3a0811688b4 c
+ | () draft
+ x 3:1ed5adcc2e8b merge
+ |\ () draft
+ | o 2:87fc619cd5f8 b
+ | | () draft
+ x | 1:c604726e05fb a
+ |/ () draft
+ o 0:d20a80d4def3 base
+ () draft
+ $ hg evolve -r 4
+ move:[4] c
+ atop:[2] b
+ working directory is now at fb87828da800
+
+ $ hg glog
+ @ 5:fb87828da800 c
+ | () draft
+ o 2:87fc619cd5f8 b
+ | () draft
+ o 0:d20a80d4def3 base
+ () draft