test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a stable
authorAugie Fackler <durin42@gmail.com>
Mon, 23 Jan 2012 12:26:01 -0600
branchstable
changeset 15990 76630fbbf4fa
parent 15989 6548a2e32285
child 15991 85ec8036d0b9
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
tests/test-rebase-collapse.t
--- a/tests/test-rebase-collapse.t	Thu Jan 26 00:21:55 2012 +0200
+++ b/tests/test-rebase-collapse.t	Mon Jan 23 12:26:01 2012 -0600
@@ -490,3 +490,54 @@
   abort: cannot collapse multiple named branches
   [255]
 
+  $ repeatchange() {
+  >   hg checkout $1
+  >   hg cp d z
+  >   echo blah >> z
+  >   hg commit -Am "$2" --user "$3"
+  > }
+  $ repeatchange 3 "E" "user1"
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ repeatchange 3 "E" "user2"
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  created new head
+  $ hg tglog
+  @  5: 'E'
+  |
+  | o  4: 'E'
+  |/
+  o  3: 'D'
+  |
+  | o  2: 'C' 2
+  | |
+  | o  1: 'B' 1
+  |/
+  o  0: 'A'
+  
+  $ hg rebase -s 5 -d 4
+  saved backup bundle to $TESTTMP/e/.hg/strip-backup/*-backup.hg (glob)
+  $ hg tglog
+  @  4: 'E'
+  |
+  o  3: 'D'
+  |
+  | o  2: 'C' 2
+  | |
+  | o  1: 'B' 1
+  |/
+  o  0: 'A'
+  
+  $ hg export tip
+  # HG changeset patch
+  # User user1
+  # Date 0 0
+  # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213
+  # Parent  41acb9dca9eb976e84cd21fcb756b4afa5a35c09
+  E
+  
+  diff -r 41acb9dca9eb -r f338eb3c2c7c z
+  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/z	Thu Jan 01 00:00:00 1970 +0000
+  @@ -0,0 +1,2 @@
+  +d
+  +blah