diff tests/test-obsolete-rebase.t @ 282:05ab164c6593

obsolete: handle rebase --collapse Recording obsolete in concludenode() did not work for --collapse because only the first revision was passed to the call. The new strategy is to track the rebase state in defineparents() and concludenode() and to create markers only after a successful non-abort call. In theory, this should also fix --continue/--abort cases. The change in test-stabilize-order.t comes from concludenode() no longer creating obsolete marker. stabilize command was actually duplicating markers, once in concludenode(), once explicitely.
author Patrick Mezard <patrick@mezard.eu>
date Tue, 19 Jun 2012 18:05:23 +0200
parents fd43e3908f09
children 8d1a8eeb5a84
line wrap: on
line diff
--- a/tests/test-obsolete-rebase.t	Tue Jun 19 17:05:39 2012 +0200
+++ b/tests/test-obsolete-rebase.t	Tue Jun 19 18:05:23 2012 +0200
@@ -69,3 +69,38 @@
   $ hg debugsuccessors
   102a90ea7b4a 03f017c74faa
   4e322f7ce8e3 000000000000
+
+Test rebase --collapse
+
+  $ hg up 0
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo c > c
+  $ hg ci -Am addc
+  adding c
+  created new head
+  $ echo c >> c
+  $ hg ci -m changec
+  $ hg rebase --collapse -d 1
+  merging c
+  $ glog --hidden
+  @  7:a7773ffa7edc@default(draft) Collapsed revision
+  |
+  | o  6:03f31481307a@default(secret) changec
+  | |
+  | o  5:076e9b2ffbe1@default(secret) addc
+  | |
+  | | o  4:4e322f7ce8e3@foo(secret) changea
+  | |/
+  +---o  3:03f017c74faa@default(draft) addb
+  | |
+  | | o  2:102a90ea7b4a@default(secret) addb
+  | |/
+  o |  1:540395c44225@default(draft) changea
+  |/
+  o  0:07f494440405@default(draft) adda
+  
+  $ hg debugsuccessors
+  03f31481307a a7773ffa7edc
+  076e9b2ffbe1 a7773ffa7edc
+  102a90ea7b4a 03f017c74faa
+  4e322f7ce8e3 000000000000