changeset 14121:012c719103ab

tests: change test-rebase-detach to use bundle/rebase.hg
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Sat, 30 Apr 2011 17:38:06 +0200
parents d7f80dbbaf49
children e83567686d66
files tests/test-rebase-detach.t
diffstat 1 files changed, 112 insertions(+), 63 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-rebase-detach.t	Sat Apr 30 17:38:06 2011 +0200
+++ b/tests/test-rebase-detach.t	Sat Apr 30 17:38:06 2011 +0200
@@ -10,41 +10,32 @@
 
   $ hg init a
   $ cd a
-
-  $ echo A > A
-  $ hg ci -Am A
-  adding A
-
-  $ echo B > B
-  $ hg ci -Am B
-  adding B
-
-  $ echo C > C
-  $ hg ci -Am C
-  adding C
-
-  $ echo D > D
-  $ hg ci -Am D
-  adding D
-
-  $ hg up -q -C 0
-
-  $ echo E > E
-  $ hg ci -Am E
-  adding E
-  created new head
+  $ hg unbundle $TESTDIR/bundles/rebase.hg
+  adding changesets
+  adding manifests
+  adding file changes
+  added 8 changesets with 7 changes to 7 files (+2 heads)
+  (run 'hg heads' to see heads, 'hg merge' to merge)
+  $ hg up tip
+  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
   $ cd ..
 
 
-Rebasing D onto E detaching from C:
+Rebasing D onto H detaching from C:
 
   $ hg clone -q -u . a a1
   $ cd a1
 
   $ hg tglog
-  @  4: 'E'
+  @  7: 'H'
   |
+  | o  6: 'G'
+  |/|
+  o |  5: 'F'
+  | |
+  | o  4: 'E'
+  |/
   | o  3: 'D'
   | |
   | o  2: 'C'
@@ -53,14 +44,20 @@
   |/
   o  0: 'A'
   
-  $ hg rebase --detach -s 3 -d 4
+  $ hg rebase --detach -s 3 -d 7
   saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  4: 'D'
+  @  7: 'D'
+  |
+  o  6: 'H'
   |
-  o  3: 'E'
-  |
+  | o  5: 'G'
+  |/|
+  o |  4: 'F'
+  | |
+  | o  3: 'E'
+  |/
   | o  2: 'C'
   | |
   | o  1: 'B'
@@ -70,19 +67,26 @@
   $ hg manifest
   A
   D
-  E
+  F
+  H
 
   $ cd ..
 
 
-Rebasing C onto E detaching from B:
+Rebasing C onto H detaching from B:
 
   $ hg clone -q -u . a a2
   $ cd a2
 
   $ hg tglog
-  @  4: 'E'
+  @  7: 'H'
   |
+  | o  6: 'G'
+  |/|
+  o |  5: 'F'
+  | |
+  | o  4: 'E'
+  |/
   | o  3: 'D'
   | |
   | o  2: 'C'
@@ -91,16 +95,22 @@
   |/
   o  0: 'A'
   
-  $ hg rebase --detach -s 2 -d 4
+  $ hg rebase --detach -s 2 -d 7
   saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  4: 'D'
+  @  7: 'D'
+  |
+  o  6: 'C'
+  |
+  o  5: 'H'
   |
-  o  3: 'C'
-  |
-  o  2: 'E'
-  |
+  | o  4: 'G'
+  |/|
+  o |  3: 'F'
+  | |
+  | o  2: 'E'
+  |/
   | o  1: 'B'
   |/
   o  0: 'A'
@@ -109,19 +119,26 @@
   A
   C
   D
-  E
+  F
+  H
 
   $ cd ..
 
 
-Rebasing B onto E using detach (same as not using it):
+Rebasing B onto H using detach (same as not using it):
 
   $ hg clone -q -u . a a3
   $ cd a3
 
   $ hg tglog
-  @  4: 'E'
+  @  7: 'H'
   |
+  | o  6: 'G'
+  |/|
+  o |  5: 'F'
+  | |
+  | o  4: 'E'
+  |/
   | o  3: 'D'
   | |
   | o  2: 'C'
@@ -130,18 +147,24 @@
   |/
   o  0: 'A'
   
-  $ hg rebase --detach -s 1 -d 4
+  $ hg rebase --detach -s 1 -d 7
   saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  4: 'D'
+  @  7: 'D'
   |
-  o  3: 'C'
+  o  6: 'C'
+  |
+  o  5: 'B'
   |
-  o  2: 'B'
+  o  4: 'H'
   |
-  o  1: 'E'
-  |
+  | o  3: 'G'
+  |/|
+  o |  2: 'F'
+  | |
+  | o  1: 'E'
+  |/
   o  0: 'A'
   
   $ hg manifest
@@ -149,19 +172,26 @@
   B
   C
   D
-  E
+  F
+  H
 
   $ cd ..
 
 
-Rebasing C onto E detaching from B and collapsing:
+Rebasing C onto H detaching from B and collapsing:
 
   $ hg clone -q -u . a a4
   $ cd a4
 
   $ hg tglog
-  @  4: 'E'
+  @  7: 'H'
   |
+  | o  6: 'G'
+  |/|
+  o |  5: 'F'
+  | |
+  | o  4: 'E'
+  |/
   | o  3: 'D'
   | |
   | o  2: 'C'
@@ -170,15 +200,21 @@
   |/
   o  0: 'A'
   
-  $ hg rebase --detach --collapse -s 2 -d 4
+  $ hg rebase --detach --collapse -s 2 -d 7
   saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  3: 'Collapsed revision
+  @  6: 'Collapsed revision
   |  * C
   |  * D'
-  o  2: 'E'
+  o  5: 'H'
   |
+  | o  4: 'G'
+  |/|
+  o |  3: 'F'
+  | |
+  | o  2: 'E'
+  |/
   | o  1: 'B'
   |/
   o  0: 'A'
@@ -187,7 +223,8 @@
   A
   C
   D
-  E
+  F
+  H
 
   $ cd ..
 
@@ -204,10 +241,16 @@
   created new head
 
   $ hg tglog
-  @  5: 'extra branch'
+  @  8: 'extra branch'
   
-  o  4: 'E'
+  o  7: 'H'
   |
+  | o  6: 'G'
+  |/|
+  o |  5: 'F'
+  | |
+  | o  4: 'E'
+  |/
   | o  3: 'D'
   | |
   | o  2: 'C'
@@ -220,15 +263,21 @@
   saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  5: 'D'
+  @  8: 'D'
   |
-  o  4: 'C'
+  o  7: 'C'
+  |
+  o  6: 'B'
   |
-  o  3: 'B'
+  o  5: 'extra branch'
+  
+  o  4: 'H'
   |
-  o  2: 'extra branch'
-  
-  o  1: 'E'
-  |
+  | o  3: 'G'
+  |/|
+  o |  2: 'F'
+  | |
+  | o  1: 'E'
+  |/
   o  0: 'A'