changeset 44146:45ec64d93b3a

tests: move non-collapse test out of test-rebase-collapse The test case was added in 76630fbbf4fa (test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a, 2012-01-23). I think `hg rebase --collapse` was involved in either the regression or in the fix that caused the regression, but the test that was added doesn't use `--collapse`, so it doesn't seem to belong in test-rebase-collapse.t. The test case is about copies, so I moved it to test-rebase-rename.t. Differential Revision: https://phab.mercurial-scm.org/D7968
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 21 Jan 2020 15:45:06 -0800
parents 0b475b0b0344
children 5e84a96d865b
files tests/test-rebase-collapse.t tests/test-rebase-rename.t
diffstat 2 files changed, 56 insertions(+), 55 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-rebase-collapse.t	Fri Nov 22 20:27:09 2019 -0800
+++ b/tests/test-rebase-collapse.t	Tue Jan 21 15:45:06 2020 -0800
@@ -486,61 +486,6 @@
   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: fbfb97b1089a 'E'
-  |
-  | o  4: f338eb3c2c7c 'E'
-  |/
-  o  3: 41acb9dca9eb 'D'
-  |
-  | o  2: 8ac4a08debf1 'C' two
-  | |
-  | o  1: 1ba175478953 'B' one
-  |/
-  o  0: 1994f17a630e 'A'
-  
-  $ hg rebase -s 5 -d 4
-  rebasing 5:fbfb97b1089a "E" (tip)
-  note: not rebasing 5:fbfb97b1089a "E" (tip), its destination already has all its changes
-  saved backup bundle to $TESTTMP/e/.hg/strip-backup/fbfb97b1089a-553e1d85-rebase.hg
-  $ hg tglog
-  @  4: f338eb3c2c7c 'E'
-  |
-  o  3: 41acb9dca9eb 'D'
-  |
-  | o  2: 8ac4a08debf1 'C' two
-  | |
-  | o  1: 1ba175478953 'B' one
-  |/
-  o  0: 1994f17a630e 'A'
-  
-  $ hg export tip
-  # HG changeset patch
-  # User user1
-  # Date 0 0
-  #      Thu Jan 01 00:00:00 1970 +0000
-  # 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
-
   $ cd ..
 
 Rebase, collapse and copies
--- a/tests/test-rebase-rename.t	Fri Nov 22 20:27:09 2019 -0800
+++ b/tests/test-rebase-rename.t	Tue Jan 21 15:45:06 2020 -0800
@@ -108,6 +108,62 @@
   
   
 
+  $ repeatchange() {
+  >   hg checkout $1
+  >   hg cp a z
+  >   echo blah >> z
+  >   hg commit -Am "$2" --user "$3"
+  > }
+  $ repeatchange 1 "E" "user1"
+  2 files updated, 0 files merged, 3 files removed, 0 files unresolved
+  created new head
+  $ repeatchange 1 "E" "user2"
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  created new head
+  $ hg tglog
+  @  5: af8ad1f97097 'E'
+  |
+  | o  4: 60f545c27784 'E'
+  |/
+  | o  3: 032a9b75e83b 'rename A'
+  | |
+  | o  2: 220d0626d185 'rename B'
+  |/
+  o  1: 3ab5da9a5c01 'B'
+  |
+  o  0: 1994f17a630e 'A'
+  
+  $ hg rebase -s 5 -d 4
+  rebasing 5:af8ad1f97097 "E" (tip)
+  note: not rebasing 5:af8ad1f97097 "E" (tip), its destination already has all its changes
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/af8ad1f97097-c3e90708-rebase.hg
+  $ hg tglog
+  @  4: 60f545c27784 'E'
+  |
+  | o  3: 032a9b75e83b 'rename A'
+  | |
+  | o  2: 220d0626d185 'rename B'
+  |/
+  o  1: 3ab5da9a5c01 'B'
+  |
+  o  0: 1994f17a630e 'A'
+  
+  $ hg export tip
+  # HG changeset patch
+  # User user1
+  # Date 0 0
+  #      Thu Jan 01 00:00:00 1970 +0000
+  # Node ID 60f545c277846e6bad309919bae3ae106f59cb39
+  # Parent  3ab5da9a5c01faa02c20f2ec4870a4f689c92da6
+  E
+  
+  diff -r 3ab5da9a5c01 -r 60f545c27784 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 @@
+  +a
+  +blah
+
   $ cd ..