diff tests/test-stabilize-result.t @ 485:41bf6c27a122

evolve: stabilize now handle conflicting changeset Some a lot of rough edge but it just damn work.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Thu, 23 Aug 2012 17:40:28 +0200
parents 20e2f2dd71f1
children 2111c655b4f5
line wrap: on
line diff
--- a/tests/test-stabilize-result.t	Thu Aug 23 14:15:36 2012 +0200
+++ b/tests/test-stabilize-result.t	Thu Aug 23 17:40:28 2012 +0200
@@ -175,15 +175,27 @@
 Stabilize of conflicting changeset with same parent
 ====================================================
 
-
+  $ rm a.orig
   $ hg up 9
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cat << EOF >> a
+  > flore
+  > arthur
+  > zephir
+  > some
+  > less
+  > conflict
+  > EOF
+  $ hg ci -m 'More addition'
+  created new head
   $ glog
-  o  14:1d94fef80e85@default(draft) bk:[] latecomer update to e3183e9c0961:
+  @  15:7391601a4bfa@default(draft) bk:[] More addition
   |
-  | @  9:355c5cda4de1@default(draft) bk:[] add c
+  | o  14:1d94fef80e85@default(draft) bk:[] latecomer update to e3183e9c0961:
   | |
-  o |  8:e3183e9c0961@default(public) bk:[] newer a
+  o |  9:355c5cda4de1@default(draft) bk:[] add c
+  | |
+  | o  8:e3183e9c0961@default(public) bk:[] newer a
   |/
   o  7:e8cc1b534401@default(public) bk:[changea] changea
   |
@@ -191,7 +203,7 @@
   
   $ echo 'babar' >> a
   $ hg amend
-  $ hg up 9
+  $ hg up 15
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   Working directory parent is obsolete
   $ mv a a.old
@@ -201,12 +213,14 @@
   $ hg amend
   2 new conflictings changesets
   $ glog
-  @  18:5d568f72d576@default(draft) bk:[] add c
+  @  19:3883461cc228@default(draft) bk:[] More addition
   |
-  | o  16:a311193de6c8@default(draft) bk:[] add c
+  | o  17:4754d61bc2db@default(draft) bk:[] More addition
   |/
   | o  14:1d94fef80e85@default(draft) bk:[] latecomer update to e3183e9c0961:
   | |
+  o |  9:355c5cda4de1@default(draft) bk:[] add c
+  | |
   | o  8:e3183e9c0961@default(public) bk:[] newer a
   |/
   o  7:e8cc1b534401@default(public) bk:[changea] changea
@@ -216,6 +230,62 @@
 
 Stabilize It
 
-  $ hg stabilize
-  conflicting not handled yet
-  [4]
+  $ hg stabilize -qn
+  hg update -c 3883461cc228 &&
+  hg merge 4754d61bc2db && 
+  hg commit -m "auto merge resolving conflict between 3883461cc228 and 4754d61bc2db"&&
+  hg up -C 7391601a4bfa &&
+  hg revert --all --rev tip &&
+  hg commit -m "`hg log -r 3883461cc228 --template={desc}`";
+  $ hg stabilize -v
+  merge:[19] More addition
+  with: [17] More addition
+  base: [15] More addition
+  merging conflicting changeset
+  resolving manifests
+  merging a
+  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+  a
+  a
+  $ hg st
+  $ hg amend -d '0 0' -m 'More addition' # kill date variation XXX should be done in stabilize
+  $ glog
+  @  22:ac6d600735a4@default(draft) bk:[] More addition
+  |
+  | o  14:1d94fef80e85@default(draft) bk:[] latecomer update to e3183e9c0961:
+  | |
+  o |  9:355c5cda4de1@default(draft) bk:[] add c
+  | |
+  | o  8:e3183e9c0961@default(public) bk:[] newer a
+  |/
+  o  7:e8cc1b534401@default(public) bk:[changea] changea
+  |
+  o  0:07f494440405@default(public) bk:[] adda
+  
+  $ hg summary
+  parent: 22:ac6d600735a4 tip
+   More addition
+  branch: default
+  commit: (clean)
+  update: 19 new changesets, 14 branch heads (merge)
+  $ hg export .
+  # HG changeset patch
+  # User test
+  # Date 0 0
+  # Node ID ac6d600735a49ee377e29d1f74a0576e8c972e7b
+  # Parent  355c5cda4de162658ed9f961a98a73a10b3167b1
+  More addition
+  
+  diff -r 355c5cda4de1 -r ac6d600735a4 a
+  --- a/a	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/a	Thu Jan 01 00:00:00 1970 +0000
+  @@ -1,1 +1,9 @@
+  +jungle
+   a
+  +flore
+  +arthur
+  +zephir
+  +some
+  +less
+  +conflict
+  +babar