Mercurial > hg
comparison tests/test-rebase-conflicts.t @ 31225:749b057b01f3
rebase: allow aborting if last-message.txt is missing
Previously, if .hg/rebasestate existed but .hg/last-message.txt was missing, 'hg
rebase --abort' would say there's no rebase in progress but 'hg checkout foo'
would say 'abort: rebase in progress'. It turns out loading the collapse message
will throw a "no rebase in progress" error if the file doesn't exist, even
though .hg/rebasestate obviously indicates a rebase is in progress.
The fix is to only throw an exception if we're trying to --continue, and to just
eat the issues if we're doing --abort.
This issue is exposed by us writing the rebase state earlier in the process.
This will be used by later patches to ensure the user can appropriately 'hg
rebase --abort' if there's a crash before the first the first commit has
finished rebasing. Tests cover all of this. The only negative affect is we now
require a hg rebase --abort in a very specific exception case, as shown in the
test.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 07 Mar 2017 16:30:31 -0800 |
parents | ce3a133f71b3 |
children | cf8ad0e6c0e4 |
comparison
equal
deleted
inserted
replaced
31224:183eb1d7f87d | 31225:749b057b01f3 |
---|---|
216 date: Tue Sep 03 13:55:08 2013 -0400 | 216 date: Tue Sep 03 13:55:08 2013 -0400 |
217 summary: added default.txt | 217 summary: added default.txt |
218 | 218 |
219 $ hg rebase -s9 -d2 --debug # use debug to really check merge base used | 219 $ hg rebase -s9 -d2 --debug # use debug to really check merge base used |
220 rebase onto 4bc80088dc6b starting from e31216eec445 | 220 rebase onto 4bc80088dc6b starting from e31216eec445 |
221 rebase status stored | |
221 ignoring null merge rebase of 3 | 222 ignoring null merge rebase of 3 |
222 ignoring null merge rebase of 4 | 223 ignoring null merge rebase of 4 |
223 ignoring null merge rebase of 6 | 224 ignoring null merge rebase of 6 |
224 ignoring null merge rebase of 8 | 225 ignoring null merge rebase of 8 |
225 rebasing 9:e31216eec445 "more changes to f1" | 226 rebasing 9:e31216eec445 "more changes to f1" |