tests/test-rebase-abort.t
branchstable
changeset 19984 7d5e7799a29f
parent 19849 e7fa36d2ad3a
child 20117 aa9385f983fa
--- a/tests/test-rebase-abort.t	Tue Nov 05 10:55:45 2013 +0100
+++ b/tests/test-rebase-abort.t	Mon Nov 04 19:59:00 2013 -0800
@@ -181,3 +181,46 @@
   
 
   $ cd ..
+
+rebase abort should not leave working copy in a merge state if tip-1 is public
+(issue4082)
+
+  $ hg init abortpublic
+  $ cd abortpublic
+  $ echo a > a && hg ci -Aqm a
+  $ hg book master
+  $ hg book foo
+  $ echo b > b && hg ci -Aqm b
+  $ hg up -q master
+  $ echo c > c && hg ci -Aqm c
+  $ hg phase -p -r .
+  $ hg up -q foo
+  $ echo C > c && hg ci -Aqm C
+  $ hg log -G --template "{rev} {desc} {bookmarks}"
+  @  3 C foo
+  |
+  | o  2 c master
+  | |
+  o |  1 b
+  |/
+  o  0 a
+  
+
+  $ hg rebase -d master -r foo
+  merging c
+  warning: conflicts during merge.
+  merging c incomplete! (edit conflicts, then use 'hg resolve --mark')
+  unresolved conflicts (see hg resolve, then hg rebase --continue)
+  [1]
+  $ hg rebase --abort
+  rebase aborted
+  $ hg log -G --template "{rev} {desc} {bookmarks}"
+  @  3 C foo
+  |
+  | o  2 c master
+  | |
+  o |  1 b
+  |/
+  o  0 a
+  
+  $ cd ..