tests/test-rebase-obsolete.t
changeset 28686 b212e01fead0
parent 28429 a47881680402
child 29063 8ede973597fd
--- a/tests/test-rebase-obsolete.t	Tue Mar 29 11:49:45 2016 -0700
+++ b/tests/test-rebase-obsolete.t	Tue Mar 29 11:50:41 2016 -0700
@@ -805,3 +805,61 @@
   phases: 8 draft
   divergent: 2 changesets
 
+rebase --continue + skipped rev because their successors are in destination
+we make a change in trunk and work on conflicting changes to make rebase abort.
+
+  $ hg log -G -r 17::
+  @  17:61bd55f69bc4 bar foo
+  |
+  ~
+
+Create the two changes in trunk
+  $ printf "a" > willconflict
+  $ hg add willconflict
+  $ hg commit -m "willconflict first version"
+
+  $ printf "dummy" > C
+  $ hg commit -m "dummy change successor"
+
+Create the changes that we will rebase
+  $ hg update -C 17 -q
+  $ printf "b" > willconflict
+  $ hg add willconflict
+  $ hg commit -m "willconflict second version"
+  created new head
+  $ printf "dummy" > K
+  $ hg add K
+  $ hg commit -m "dummy change"
+  $ printf "dummy" > L
+  $ hg add L
+  $ hg commit -m "dummy change"
+  $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 19 -T '{node}'` --config experimental.evolution=all
+
+  $ hg log -G -r 17::
+  @  22:7bdc8a87673d dummy change
+  |
+  x  21:8b31da3c4919 dummy change
+  |
+  o  20:b82fb57ea638 willconflict second version
+  |
+  | o  19:601db7a18f51 dummy change successor
+  | |
+  | o  18:357ddf1602d5 willconflict first version
+  |/
+  o  17:61bd55f69bc4 bar foo
+  |
+  ~
+  $ hg rebase -r ".^^ + .^ + ." -d 19
+  rebasing 20:b82fb57ea638 "willconflict second version"
+  merging willconflict
+  warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark')
+  unresolved conflicts (see hg resolve, then hg rebase --continue)
+  [1]
+
+  $ hg resolve --mark willconflict
+  (no more unresolved files)
+  continue: hg rebase --continue
+  $ hg rebase --continue
+  rebasing 20:b82fb57ea638 "willconflict second version"
+  note: not rebasing 21:8b31da3c4919 "dummy change", already in destination as 19:601db7a18f51 "dummy change successor"
+  rebasing 22:7bdc8a87673d "dummy change" (tip)