tests: fix a test case to not create conflicts
authorPulkit Goyal <7895pulkit@gmail.com>
Thu, 14 Jun 2018 01:39:11 +0530
changeset 3849 a17d4934c5ce
parent 3848 90f1a64875ad
child 3850 340cf6fbe9e9
tests: fix a test case to not create conflicts This is the test case where we are testing about divergence resolution of stack of patches. If the stack is as follows: C1 C2 | | B1 B2 | | A1 A2 \/ base And A1-A2, B1-B2 and C1-C2 are content-divergent, and merging A1-A2 results in conflicts. Now if you resolve conflicts and continue resoling B1-B2, the conflicts of A1-A2 will still be there. We need somehow to understand the work we has done and not create conflicts again. To test the evolution functionality for now, we make sure conflicts does not occur.
tests/test-evolve-content-divergence.t
--- a/tests/test-evolve-content-divergence.t	Thu Jun 14 01:06:12 2018 +0530
+++ b/tests/test-evolve-content-divergence.t	Thu Jun 14 01:39:11 2018 +0530
@@ -788,22 +788,24 @@
   $ echo bar > a
   $ hg amend -m "watbar to a"
   3 new orphan changesets
+  $ echo wat > a
+  $ hg amend -m "watbar to a"
   $ hg evolve --all
   move:[2] added b
-  atop:[5] watbar to a
+  atop:[6] watbar to a
   move:[3] added c
-  atop:[6] added b
+  atop:[7] added b
   move:[4] added d
-  atop:[7] added c
-  working directory is now at 513e3267034e
+  atop:[8] added c
+  working directory is now at 15c781f93cac
   $ hg glog
-  @  8:513e3267034e added d
+  @  9:15c781f93cac added d
   |   () [default] draft
-  o  7:accb7a2b6ae9 added c
+  o  8:9e5fb1d5b955 added c
   |   () [default] draft
-  o  6:60280764eb0e added b
+  o  7:88516dccf68a added b
   |   () [default] draft
-  o  5:2587cb3ef1fe watbar to a
+  o  6:82b74d5dc678 watbar to a
   |   () [default] draft
   o  0:8fa14d15e168 added hgignore
       () [default] draft
@@ -840,20 +842,20 @@
   adding changesets
   adding manifests
   adding file changes
-  added 4 changesets with 1 changes to 4 files (+1 heads)
-  4 new obsolescence markers
+  added 4 changesets with 0 changes to 4 files (+1 heads)
+  5 new obsolescence markers
   8 new content-divergent changesets
-  new changesets 2587cb3ef1fe:513e3267034e
+  new changesets 82b74d5dc678:15c781f93cac
   (run 'hg heads' to see heads, 'hg merge' to merge)
 
   $ hg glog
-  *  12:513e3267034e added d
+  *  12:15c781f93cac added d
   |   () [default] draft
-  *  11:accb7a2b6ae9 added c
+  *  11:9e5fb1d5b955 added c
   |   () [default] draft
-  *  10:60280764eb0e added b
+  *  10:88516dccf68a added b
   |   () [default] draft
-  *  9:2587cb3ef1fe watbar to a
+  *  9:82b74d5dc678 watbar to a
   |   () [default] draft
   | @  8:c72d2885eb51 added d
   | |   () [default] draft
@@ -866,62 +868,50 @@
   o  0:8fa14d15e168 added hgignore
       () [default] draft
 
-XXX: we are not resolving divergence in the correct order here
   $ hg evolve --all --content-divergent
   merge:[5] watbar to a
   with: [9] watbar to a
   base: [1] added a
   updating to "local" side of the conflict: 8e222f257bbf
-  merging "other" content-divergent changeset '2587cb3ef1fe'
-  merging a
-  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
-  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  abort: fix conflicts and see `hg help evolve.interrupted`
-  [255]
-
-  $ echo watbar > a
-  $ hg resolve -m
-  (no more unresolved files)
-  continue: hg evolve --continue
-
-  $ hg evolve --continue
+  merging "other" content-divergent changeset '82b74d5dc678'
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   6 new orphan changesets
-  skipping d5f148423c16: have a different parent than 60280764eb0e (not handled yet)
-  | d5f148423c16, 60280764eb0e are not based on the same changeset.
+  skipping d5f148423c16: have a different parent than 88516dccf68a (not handled yet)
+  | d5f148423c16, 88516dccf68a are not based on the same changeset.
+  | With the current state of its implementation, 
+  | evolve does not work in that case.
+  | rebase one of them next to the other and run 
+  | this command again.
+  | - either: hg rebase --dest 'p1(d5f148423c16)' -r 88516dccf68a
+  | - or:     hg rebase --dest 'p1(88516dccf68a)' -r d5f148423c16
+  skipping 3ce4be6d8e5e: have a different parent than 9e5fb1d5b955 (not handled yet)
+  | 3ce4be6d8e5e, 9e5fb1d5b955 are not based on the same changeset.
   | With the current state of its implementation, 
   | evolve does not work in that case.
   | rebase one of them next to the other and run 
   | this command again.
-  | - either: hg rebase --dest 'p1(d5f148423c16)' -r 60280764eb0e
-  | - or:     hg rebase --dest 'p1(60280764eb0e)' -r d5f148423c16
-  skipping 3ce4be6d8e5e: have a different parent than accb7a2b6ae9 (not handled yet)
-  | 3ce4be6d8e5e, accb7a2b6ae9 are not based on the same changeset.
+  | - either: hg rebase --dest 'p1(3ce4be6d8e5e)' -r 9e5fb1d5b955
+  | - or:     hg rebase --dest 'p1(9e5fb1d5b955)' -r 3ce4be6d8e5e
+  skipping c72d2885eb51: have a different parent than 15c781f93cac (not handled yet)
+  | c72d2885eb51, 15c781f93cac are not based on the same changeset.
   | With the current state of its implementation, 
   | evolve does not work in that case.
   | rebase one of them next to the other and run 
   | this command again.
-  | - either: hg rebase --dest 'p1(3ce4be6d8e5e)' -r accb7a2b6ae9
-  | - or:     hg rebase --dest 'p1(accb7a2b6ae9)' -r 3ce4be6d8e5e
-  skipping c72d2885eb51: have a different parent than 513e3267034e (not handled yet)
-  | c72d2885eb51, 513e3267034e are not based on the same changeset.
-  | With the current state of its implementation, 
-  | evolve does not work in that case.
-  | rebase one of them next to the other and run 
-  | this command again.
-  | - either: hg rebase --dest 'p1(c72d2885eb51)' -r 513e3267034e
-  | - or:     hg rebase --dest 'p1(513e3267034e)' -r c72d2885eb51
-  working directory is now at b9f381e183a3
+  | - either: hg rebase --dest 'p1(c72d2885eb51)' -r 15c781f93cac
+  | - or:     hg rebase --dest 'p1(15c781f93cac)' -r c72d2885eb51
+  working directory is now at f66f262fff6c
 
   $ hg glog
-  @  13:b9f381e183a3 watbar to a
+  @  13:f66f262fff6c watbar to a
   |   () [default] draft
-  | *  12:513e3267034e added d
+  | *  12:15c781f93cac added d
   | |   () [default] draft
-  | *  11:accb7a2b6ae9 added c
+  | *  11:9e5fb1d5b955 added c
   | |   () [default] draft
-  | *  10:60280764eb0e added b
+  | *  10:88516dccf68a added b
   | |   () [default] draft
-  | x  9:2587cb3ef1fe watbar to a
+  | x  9:82b74d5dc678 watbar to a
   |/    () [default] draft
   | *  8:c72d2885eb51 added d
   | |   () [default] draft