Patchwork [1,of,2] tests: prepare rebase test for wc parent preservation

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 14, 2013, 2:50 p.m.
Message ID <b24448b7d0e6e0b0d871.1381762231@vulgaris>
Download mbox | patch
Permalink /patch/2756/
State Accepted
Commit c23c62209cc4ce88e8dd7d4f8cb8e59ea3334566
Headers show

Comments

Pierre-Yves David - Oct. 14, 2013, 2:50 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1381762194 -7200
#      Mon Oct 14 16:49:54 2013 +0200
# Node ID b24448b7d0e6e0b0d871871ddb40b68f95eee7c7
# Parent  5ba3cf17da9e5ccb89bb4f73582dbf26e0f75155
tests: prepare rebase test for wc parent preservation

In the way to solving issue3813 we'll preserve the working directory parent
after the rebase. Multiple rebases test expect the working directory parent to
be tip after rebase. We patches them before the actual change to prevent
confusion.

Patch

diff --git a/tests/test-histedit-obsolete.t b/tests/test-histedit-obsolete.t
--- a/tests/test-histedit-obsolete.t
+++ b/tests/test-histedit-obsolete.t
@@ -146,10 +146,11 @@  Test that rewriting leaving instability 
   9:c13eb81022ca f (no-eol)
 
 stabilise
 
   $ hg rebase  -r 'unstable()' -d .
+  $ hg up tip -q
 
 Test dropping of changeset on the top of the stack
 -------------------------------------------------------
 
 Nothing is rewritten below, the working directory parent must be change for the
diff --git a/tests/test-rebase-collapse.t b/tests/test-rebase-collapse.t
--- a/tests/test-rebase-collapse.t
+++ b/tests/test-rebase-collapse.t
@@ -69,11 +69,11 @@  Rebasing B onto H and collapsing changes
   | |
   | o  1:draft 'E'
   |/
   o  0:draft 'A'
   
-  $ hg manifest
+  $ hg manifest --rev tip
   A
   B
   C
   D
   F
@@ -105,11 +105,11 @@  Rebasing E onto H:
   | |
   | o  1: 'B'
   |/
   o  0: 'A'
   
-  $ hg manifest
+  $ hg manifest --rev tip
   A
   E
   F
   H
 
@@ -140,11 +140,11 @@  Rebasing G onto H with custom message:
   | |
   | o  1: 'B'
   |/
   o  0: 'A'
   
-  $ hg manifest
+  $ hg manifest --rev tip
   A
   E
   F
   H
 
@@ -247,11 +247,11 @@  Rebase and collapse - E onto H:
   | |/
   o /  1: 'B'
   |/
   o  0: 'A'
   
-  $ hg manifest
+  $ hg manifest --rev tip
   A
   C
   D
   E
   F
@@ -397,18 +397,19 @@  Rebase and collapse - E onto I:
   | |/
   o /  1: 'B'
   |/
   o  0: 'A'
   
-  $ hg manifest
+  $ hg manifest --rev tip
   A
   C
   D
   E
   G
   I
 
+  $ hg up tip -q
   $ cat E
   F
 
   $ cd ..
 
@@ -479,11 +480,11 @@  Rebase and collapse - B onto F:
   |  * E'
   o  1: 'F'
   |
   o  0: 'A'
   
-  $ hg manifest
+  $ hg manifest --rev tip
   A
   B
   C
   D
   F
@@ -609,16 +610,17 @@  Rebase, collapse and copies
   merging c and f to f
   merging e and g to g
   merging f and c to c
   saved backup bundle to $TESTTMP/copies/.hg/strip-backup/*-backup.hg (glob)
   $ hg st
-  $ hg st --copies --change .
+  $ hg st --copies --change tip
   A d
     a
   A g
     b
   R b
+  $ hg up tip -q
   $ cat c
   c
   c
   $ cat d
   a
@@ -646,18 +648,19 @@  Test collapsing a middle revision in-pla
 
 Test collapsing in place
 
   $ hg rebase --collapse -b . -d 0
   saved backup bundle to $TESTTMP/copies/.hg/strip-backup/*-backup.hg (glob)
-  $ hg st --change . --copies
+  $ hg st --change tip --copies
   M a
   M c
   A d
     a
   A g
     b
   R b
+  $ hg up tip -q
   $ cat a
   a
   a
   $ cat c
   c
@@ -739,10 +742,10 @@  Test collapsing changes that add then re
   $ hg tglog
   @  1: 'collapsed'
   |
   o  0: 'base'
   
-  $ hg manifest
+  $ hg manifest --rev tip
   b
   base
 
   $ cd ..
diff --git a/tests/test-rebase-detach.t b/tests/test-rebase-detach.t
--- a/tests/test-rebase-detach.t
+++ b/tests/test-rebase-detach.t
@@ -66,11 +66,11 @@  Rebasing D onto H detaching from C:
   | |
   | o  1:draft 'B'
   |/
   o  0:draft 'A'
   
-  $ hg manifest
+  $ hg manifest --rev tip
   A
   D
   F
   H
 
@@ -117,11 +117,11 @@  Rebasing C onto H detaching from B:
   |/
   | o  1: 'B'
   |/
   o  0: 'A'
   
-  $ hg manifest
+  $ hg manifest --rev tip
   A
   C
   D
   F
   H
@@ -169,11 +169,11 @@  Rebasing B onto H using detach (same as 
   | |
   | o  1: 'E'
   |/
   o  0: 'A'
   
-  $ hg manifest
+  $ hg manifest --rev tip
   A
   B
   C
   D
   F
@@ -222,11 +222,11 @@  Rebasing C onto H detaching from B and c
   |/
   | o  1:draft 'B'
   |/
   o  0:draft 'A'
   
-  $ hg manifest
+  $ hg manifest --rev tip
   A
   C
   D
   F
   H
@@ -348,11 +348,11 @@  Verify that target is not selected as ex
   | o  1: 'B'
   |/
   o  0: 'A'
   
 
-  $ hg parents
+  $ hg log --rev tip
   changeset:   8:9472f4b1d736
   tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     Collapsed revision
diff --git a/tests/test-rebase-obsolete.t b/tests/test-rebase-obsolete.t
--- a/tests/test-rebase-obsolete.t
+++ b/tests/test-rebase-obsolete.t
@@ -266,11 +266,11 @@  collapse rebase
   | |
   | x  1:42ccdea3bb16 B
   |/
   o  0:cd010b8cd998 A
   
-  $ hg id --debug
+  $ hg id --debug -r tip
   4dc2197e807bae9817f09905b50ab288be2dbbcf tip
   $ hg debugobsolete
   42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 {'date': '*', 'user': 'test'} (glob)
   5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 {'date': '*', 'user': 'test'} (glob)
   32af7686d403cf45b5d95f2d70cebea587ac806a 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 {'date': '*', 'user': 'test'} (glob)