diff tests/test-stabilize-result.t @ 3787:dc81a788f278

evolve: use cmdrewrite.amend() instead of creating a new commit This patch backs out changeset 88601e1cd5d8. We replaced cmdrewrite.amend() with creating new commit because using amend(), a high level function was not good and creating a new commit gave us more control over things. **HOWEVER** to get more control, you need to get arrange all the pieces together perfectly. Creating a new commit, the existing logic has some bugs around dirstate handling, the `repo.dirstate.setparents()` call especially. Sometimes this fixes the dirstate correctly sometimes not. As Pierre-Yves David said, "Having a "clumsy" implementation with the right behavior is usually a good first step. So having an amend based implementation seems like a good first step.", let's take a step back and get back using amend so that we can have a correct basic implementation which is bug free.
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 05 Jun 2018 00:53:21 +0530
parents 88601e1cd5d8
children ededd22e7c7b
line wrap: on
line diff
--- a/tests/test-stabilize-result.t	Sun Jun 03 01:59:41 2018 +0530
+++ b/tests/test-stabilize-result.t	Tue Jun 05 00:53:21 2018 +0530
@@ -294,14 +294,16 @@
   resolving manifests
   merging a
   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+  amending changeset eacc9c8240fe
   committing files:
   a
   committing manifest
   committing changelog
-  working directory is now at 4d6ed26797bc
+  committed changeset 15:f344982e63c4
+  working directory is now at f344982e63c4
   $ hg st
   $ glog
-  @  15:4d6ed26797bc@default(draft) bk:[] More addition
+  @  15:f344982e63c4@default(draft) bk:[] More addition
   |
   | o  11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363:
   | |
@@ -314,7 +316,7 @@
   o  0:07f494440405@default(public) bk:[] adda
   
   $ hg summary
-  parent: 15:4d6ed26797bc tip
+  parent: 15:f344982e63c4 tip
    More addition
   branch: default
   commit: (clean)
@@ -325,11 +327,11 @@
   # User test
   # Date 0 0
   #      Thu Jan 01 00:00:00 1970 +0000
-  # Node ID 4d6ed26797bc392c0099e48402a5134e669f1a60
+  # Node ID f344982e63c462b1e44c0371c804685389e673a9
   # Parent  7bc2f5967f5e4ed277f60a89b7b04cc5d6407ced
   More addition
   
-  diff -r 7bc2f5967f5e -r 4d6ed26797bc a
+  diff -r 7bc2f5967f5e -r f344982e63c4 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 @@
@@ -349,9 +351,9 @@
   $ hg up --hidden 3932c176bbaa
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   updated to hidden changeset 3932c176bbaa
-  (hidden revision '3932c176bbaa' was rewritten as: 4d6ed26797bc)
+  (hidden revision '3932c176bbaa' was rewritten as: f344982e63c4)
   working directory parent is obsolete! (3932c176bbaa)
-  (use 'hg evolve' to update to its successor: 4d6ed26797bc)
+  (use 'hg evolve' to update to its successor: f344982e63c4)
   $ echo 'gotta break' >> a
   $ hg amend
   2 new content-divergent changesets
@@ -364,7 +366,7 @@
   $ glog
   @  17:0b336205a5d0@default(draft) bk:[] More addition (2)
   |
-  | *  15:4d6ed26797bc@default(draft) bk:[] More addition
+  | *  15:f344982e63c4@default(draft) bk:[] More addition
   |/
   | o  11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363:
   | |
@@ -379,8 +381,8 @@
 
   $ hg evolve -qn --content-divergent
   hg update -c 0b336205a5d0 &&
-  hg merge 4d6ed26797bc &&
-  hg commit -m "auto merge resolving conflict between 0b336205a5d0 and 4d6ed26797bc"&&
+  hg merge f344982e63c4 &&
+  hg commit -m "auto merge resolving conflict between 0b336205a5d0 and f344982e63c4"&&
   hg up -C 3932c176bbaa &&
   hg revert --all --rev tip &&
   hg commit -m "`hg log -r 0b336205a5d0 --template={desc}`";
@@ -388,7 +390,7 @@
   merge:[17] More addition (2)
   with: [15] More addition
   base: [12] More addition
-  merging "other" content-divergent changeset '4d6ed26797bc'
+  merging "other" content-divergent changeset 'f344982e63c4'
   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
@@ -411,9 +413,9 @@
   (no more unresolved files)
   continue: hg evolve --continue
   $ hg evolve --continue
-  working directory is now at e8746835a2a1
+  working directory is now at e015aa78acee
   $ glog
-  @  18:e8746835a2a1@default(draft) bk:[] More addition (2)
+  @  18:e015aa78acee@default(draft) bk:[] More addition (2)
   |
   | o  11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363:
   | |
@@ -430,11 +432,11 @@
   # User test
   # Date 0 0
   #      Thu Jan 01 00:00:00 1970 +0000
-  # Node ID e8746835a2a13122bc8c0ed84fe4ee35649af25d
+  # Node ID e015aa78acee692d26215fafdb7f70974682739c
   # Parent  7bc2f5967f5e4ed277f60a89b7b04cc5d6407ced
   More addition (2)
   
-  diff -r 7bc2f5967f5e -r e8746835a2a1 a
+  diff -r 7bc2f5967f5e -r e015aa78acee 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 @@