test: fix a phase divergence test case to actually not contains conflict
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 29 Mar 2019 15:15:07 +0100
changeset 4472 5dbaabfe2c59
parent 4471 3caa4a459439
child 4473 14437b18b024
test: fix a phase divergence test case to actually not contains conflict The previous test case had a conflict, but that conflict is currently not raise by phase divergence resolution. This is an independent bug to solve.
tests/test-evolve-public-content-divergent.t
--- a/tests/test-evolve-public-content-divergent.t	Fri Apr 05 16:31:45 2019 +0200
+++ b/tests/test-evolve-public-content-divergent.t	Fri Mar 29 15:15:07 2019 +0100
@@ -454,8 +454,11 @@
   $ hg evolve -l
   $ cd ..
 
-Testing the case when csets are on different parent and conflict in relocation but not in merging:
---------------------------------------------------------------------------------------------------
+Different parents, relocation conflict
+--------------------------------------
+
+Testing the case when csets are on different parent and conflict in relocation
+but not in merging.
 
   $ hg init pubdiv3
   $ cd pubdiv3
@@ -466,14 +469,15 @@
 
   $ hg up .^^
   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ echo d > d
   $ echo cfoo > c
   $ echo e > e
-  $ hg add c e
-  $ hg ci -m "added c e"
+  $ hg add d c e
+  $ hg ci -m "added d c e"
   created new head
 
-  $ hg up 2
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg up 'desc("added c")'
+  1 files updated, 0 files merged, 2 files removed, 0 files unresolved
   $ echo dd > d
   $ hg add d
   $ hg ci -m "added d"
@@ -483,7 +487,7 @@
   @  5:93cd84bbdaca added d
   |   draft
   |
-  | o  4:e568fd1029bb added c e
+  | o  4:f31bcc378766 added d c e
   | |   draft
   | |
   +---o  3:9150fe93bec6 added d
@@ -511,7 +515,7 @@
   @  5:93cd84bbdaca added d
   |   public
   |
-  | *  4:e568fd1029bb added c e
+  | *  4:f31bcc378766 added d c e
   | |   draft content-divergent
   | |
   o |  2:155349b645be added c
@@ -525,9 +529,9 @@
   
   $ hg evolve --content-divergent --any
   merge:[5] added d
-  with: [4] added c e
+  with: [4] added d c e
   base: [3] added d
-  rebasing "other" content-divergent changeset e568fd1029bb on 155349b645be
+  rebasing "other" content-divergent changeset f31bcc378766 on 155349b645be
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
   fix conflicts and see `hg help evolve.interrupted`
@@ -542,7 +546,12 @@
    c
   +=======
   +cfoo
-  +>>>>>>> evolving:    e568fd1029bb - test: added c e
+  +>>>>>>> evolving:    f31bcc378766 - test: added d c e
+  diff -r 155349b645be d
+  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/d	Thu Jan 01 00:00:00 1970 +0000
+  @@ -0,0 +1,1 @@
+  +d
   diff -r 155349b645be e
   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   +++ b/e	Thu Jan 01 00:00:00 1970 +0000
@@ -555,12 +564,28 @@
   continue: hg evolve --continue
 
   $ hg evolve --continue
-  evolving 4:e568fd1029bb "added c e"
+  evolving 4:f31bcc378766 "added d c e"
   updating to "local" side of the conflict: 93cd84bbdaca
-  merging "other" content-divergent changeset '2af3359250d3'
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  committed as 06e4564a3897
-  working directory is now at 06e4564a3897
+  merging "other" content-divergent changeset 'bd28d3e4a228'
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  committed as 412dde898967
+  working directory is now at 412dde898967
+  $ hg export
+  # HG changeset patch
+  # User test
+  # Date 0 0
+  #      Thu Jan 01 00:00:00 1970 +0000
+  # Node ID 412dde898967b50e7d334aefff778a9af46d29d1
+  # Parent  93cd84bbdacaeb8f881c29a609dbdd30c38cbc57
+  phase-divergent update to 93cd84bbdaca:
+  
+  added d c e
+  
+  diff -r 93cd84bbdaca -r 412dde898967 e
+  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/e	Thu Jan 01 00:00:00 1970 +0000
+  @@ -0,0 +1,1 @@
+  +e
 
   $ hg evolve -l
   $ cd ..