tests: move rebase-keep-branch into rebase-named-branches
authorNicolas Dumazet <nicdumz.commits@gmail.com>
Sat, 30 Apr 2011 17:38:06 +0200
changeset 14124 81ecc951f57b
parent 14123 7d1b637738a3
child 14125 2852843947da
tests: move rebase-keep-branch into rebase-named-branches It's not worth building a repository just to test keep branch when we can do it our bigger, other, already built repositories.
tests/test-rebase-keep-branch.t
tests/test-rebase-named-branches.t
--- a/tests/test-rebase-keep-branch.t	Sat Apr 30 17:38:06 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-  $ cat >> $HGRCPATH <<EOF
-  > [extensions]
-  > graphlog=
-  > rebase=
-  > 
-  > [alias]
-  > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
-  > EOF
-
-
-  $ hg init a
-  $ cd a
-
-  $ echo c1 > c1
-  $ hg ci -Am c1
-  adding c1
-
-  $ echo c2 > c2
-  $ hg ci -Am c2
-  adding c2
-
-  $ echo l1 > l1
-  $ hg ci -Am l1
-  adding l1
-
-  $ echo l2 > l2
-  $ hg ci -Am l2
-  adding l2
-
-  $ hg up -q -C 1
-
-  $ hg branch 'notdefault'
-  marked working directory as branch notdefault
-
-  $ echo r1 > r1
-  $ hg ci -Am r1
-  adding r1
-
-  $ hg tglog
-  @  4: 'r1' notdefault
-  |
-  | o  3: 'l2'
-  | |
-  | o  2: 'l1'
-  |/
-  o  1: 'c2'
-  |
-  o  0: 'c1'
-  
-
-Rebase a branch while preserving the branch name:
-
-  $ hg up -q -C 3
-
-  $ hg rebase -b 4 -d 3 --keepbranches
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob)
-
-  $ hg tglog
-  @  4: 'r1' notdefault
-  |
-  o  3: 'l2'
-  |
-  o  2: 'l1'
-  |
-  o  1: 'c2'
-  |
-  o  0: 'c1'
-  
-  $ hg branch
-  notdefault
-
--- a/tests/test-rebase-named-branches.t	Sat Apr 30 17:38:06 2011 +0200
+++ b/tests/test-rebase-named-branches.t	Sat Apr 30 17:38:06 2011 +0200
@@ -56,29 +56,51 @@
   
 
 
-  $ hg rebase -s 7 -d 8
-  abort: source is ancestor of destination
-  [255]
-
-  $ hg rebase -s 8 -d 7
+  $ hg rebase -s 1 -d 8 --keepbranches
   saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  8: 'extra named branch'
+  @  8: 'D'
   |
-  o  7: 'H'
+  o  7: 'C'
+  |
+  o  6: 'B'
   |
-  | o  6: 'G'
+  o  5: 'extra named branch' dev
+  |
+  o  4: 'H'
+  |
+  | o  3: 'G'
   |/|
-  o |  5: 'F'
+  o |  2: 'F'
   | |
-  | o  4: 'E'
+  | o  1: 'E'
   |/
-  | o  3: 'D'
+  o  0: 'A'
+  
+  $ hg rebase -s 4 -d 5
+  abort: source is ancestor of destination
+  [255]
+
+  $ hg rebase -s 5 -d 4
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
+
+  $ hg tglog
+  @  8: 'D'
+  |
+  o  7: 'C'
+  |
+  o  6: 'B'
+  |
+  o  5: 'extra named branch'
+  |
+  o  4: 'H'
+  |
+  | o  3: 'G'
+  |/|
+  o |  2: 'F'
   | |
-  | o  2: 'C'
-  | |
-  | o  1: 'B'
+  | o  1: 'E'
   |/
   o  0: 'A'