evolve: add a test in pubdiv where only merging leads to conflict
Added a test in public divergence where both the cset are on the different
parent and no conflict in relocation but in merging.
--- a/tests/test-evolve-public-content-divergent.t Thu Feb 28 03:12:39 2019 +0530
+++ b/tests/test-evolve-public-content-divergent.t Sat Mar 02 02:34:29 2019 +0530
@@ -570,6 +570,100 @@
$ hg evolve -l
$ cd ..
+Testing the case when merging leads to conflicts but relocation won't:
+---------------------------------------------------------------------
+
+ $ hg init pubdiv3.5
+ $ cd pubdiv3.5
+ $ for ch in a b c d; do
+ > echo $ch > $ch;
+ > hg ci -Aqm "added "$ch;
+ > done;
+
+ $ hg up .^^
+ 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+ $ echo dconflict > d
+ $ hg add d
+ $ hg ci -m "added d"
+ created new head
+
+ $ hg up 2
+ 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ $ echo dd > d
+ $ hg add d
+ $ hg ci -m "added d"
+ created new head
+
+ $ hg glog
+ @ 5:93cd84bbdaca added d
+ | draft
+ |
+ | o 4:9411ad1fe615 added d
+ | | draft
+ | |
+ +---o 3:9150fe93bec6 added d
+ | | draft
+ | |
+ o | 2:155349b645be added c
+ |/ draft
+ |
+ o 1:5f6d8a4bf34a added b
+ | draft
+ |
+ o 0:9092f1db7931 added a
+ draft
+
+ $ hg prune 3 -s 5
+ 1 changesets pruned
+ $ hg prune 3 -s 4 --hidden
+ 1 changesets pruned
+ 2 new content-divergent changesets
+
+Change phase to public for one head:
+ $ hg phase --public -r 5
+
+ $ hg glog
+ @ 5:93cd84bbdaca added d
+ | public
+ |
+ | * 4:9411ad1fe615 added d
+ | | draft content-divergent
+ | |
+ o | 2:155349b645be added c
+ |/ public
+ |
+ o 1:5f6d8a4bf34a added b
+ | public
+ |
+ o 0:9092f1db7931 added a
+ public
+
+ $ hg evolve --content-divergent --any
+ merge:[5] added d
+ with: [4] added d
+ base: [3] added d
+ rebasing "other" content-divergent changeset 9411ad1fe615 on 155349b645be
+ updating to "local" side of the conflict: 93cd84bbdaca
+ merging "other" content-divergent changeset 'b5c690cdf1d5'
+ merging d
+ warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
+ 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+ fix conflicts and see `hg help evolve.interrupted`
+ [1]
+
+ $ echo d > d
+ $ hg res -m
+ (no more unresolved files)
+ continue: hg evolve --continue
+
+ $ hg evolve --continue
+ computing new diff
+ committed as 2a0f44767904
+ working directory is now at 2a0f44767904
+
+ $ hg evolve -l
+ $ cd ..
+
Testing the case when relocation and merging both leads to conflicts:
--------------------------------------------------------------------