changeset 4407:7fd0cbf6190d

evolve: change in a test which demonstrate divergence resolution can break This patch just add "--any" flag to "hg evolve --content-divergent" in a test and changed output reflect that there is something which is not handled correctly. After looking into code I found that it is because of using a evolvestate value which is not updated i.e evolvestate['divergent'] Next patch will fix this problem.
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Fri, 22 Feb 2019 23:49:37 +0530
parents 450487b4e1a3
children 02ece0e5865e
files tests/test-evolve-content-divergence.t
diffstat 1 files changed, 16 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-evolve-content-divergence.t	Fri Feb 22 23:57:18 2019 +0530
+++ b/tests/test-evolve-content-divergence.t	Fri Feb 22 23:49:37 2019 +0530
@@ -660,7 +660,7 @@
   o  0:8fa14d15e168 added hgignore
       () [default] draft
 
-  $ hg evolve --content-divergent
+  $ hg evolve --content-divergent --any
   merge:[25] added z
   with: [23] added z
   base: [22] added z
@@ -693,35 +693,26 @@
 
   $ hg evolve --continue
   evolving 23:3f7a1f693080 "added z"
-  updating to "local" side of the conflict: 53242575ffa9
+  updating to "local" side of the conflict: 3f7a1f693080
   merging "other" content-divergent changeset 'cdb0643c69fc'
-  merging y
-  warning: conflicts while merging y! (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]
+  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  working directory is now at 10c9f94f1e99
 
   $ hg diff
-  diff -r 53242575ffa9 y
-  --- a/y	Thu Jan 01 00:00:00 1970 +0000
-  +++ b/y	Thu Jan 01 00:00:00 1970 +0000
-  @@ -1,1 +1,5 @@
-  +<<<<<<< local: 53242575ffa9 bar - test: added z
-   watbar
-  +=======
-  +foo
-  +>>>>>>> other: cdb0643c69fc - test: added z
 
   $ echo foo > y
   $ hg resolve -m
-  (no more unresolved files)
-  continue: hg evolve --continue
+  abort: resolve command not applicable when not merging
+  [255]
   $ hg evolve --continue
-  working directory is now at 6fc7d9682de6
+  abort: no interrupted evolve to continue
+  [255]
 
   $ hg glog
-  @  27:6fc7d9682de6 added z
-  |   () [bar] draft
+  @  27:10c9f94f1e99 added z
+  |   () [default] draft
+  | *  25:53242575ffa9 added z
+  |/    () [bar] draft
   o  21:7bbcf24ddecf added y
   |   () [bar] draft
   o  15:b006cf317e0e added foo to x
@@ -742,22 +733,21 @@
   # User test
   # Date 0 0
   #      Thu Jan 01 00:00:00 1970 +0000
-  # Branch bar
-  # Node ID 6fc7d9682de6e3bee6c8b1266b756ed7d522b7e4
+  # Node ID 10c9f94f1e9902d905b22019d711d31f3642f589
   # Parent  7bbcf24ddecfe97d7c2ac6fa8c07c155c8fda47b
   added z
   
-  diff -r 7bbcf24ddecf -r 6fc7d9682de6 y
+  diff -r 7bbcf24ddecf -r 10c9f94f1e99 y
   --- a/y	Thu Jan 01 00:00:00 1970 +0000
   +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   @@ -1,1 +1,1 @@
   -watbar
   +foo
-  diff -r 7bbcf24ddecf -r 6fc7d9682de6 z
+  diff -r 7bbcf24ddecf -r 10c9f94f1e99 z
   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   +++ b/z	Thu Jan 01 00:00:00 1970 +0000
   @@ -0,0 +1,1 @@
-  +bar
+  +z
 
   $ cd ..