Skip to content
Snippets Groups Projects
Commit 01ad8daa authored by Jordi Gutiérrez Hermoso's avatar Jordi Gutiérrez Hermoso
Browse files

test-rebase-abort: add test from issue4009

The fix for issue4009, namely fe78eb7bcca0, introduced issue4661.
Let's make sure that the fix for issue4661 will not reintroduce
issue4009.
parent 65e8dac7
No related branches found
No related tags found
No related merge requests found
......@@ -241,3 +241,50 @@
o 0 a
$ cd ..
Make sure we don't clobber changes in the working directory when the
user has somehow managed to update to a different revision (issue4009)
$ hg init noupdate
$ cd noupdate
$ hg book @
$ echo original > a
$ hg add a
$ hg commit -m a
$ echo x > b
$ hg add b
$ hg commit -m b1
$ hg up 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
(leaving bookmark @)
$ hg book foo
$ echo y > b
$ hg add b
$ hg commit -m b2
created new head
$ hg rebase -d @ -b foo --tool=internal:fail
rebasing 2:070cf4580bb5 "b2" (tip foo)
unresolved conflicts (see hg resolve, then hg rebase --continue)
[1]
$ mv .hg/rebasestate ./ # so we're allowed to hg up like in mercurial <2.6.3
$ hg up -C 0 # user does other stuff in the repo
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ mv rebasestate .hg/ # user upgrades to 2.7
$ echo new > a
$ hg up 1 # user gets an error saying to run hg rebase --abort
abort: rebase in progress
(use 'hg rebase --continue' or 'hg rebase --abort')
[255]
$ cat a
new
$ hg rebase --abort
rebase aborted
$ cat a
new
$ cd ..
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment