Skip to content
Snippets Groups Projects
Commit 8ddfdcce4bd6 authored by Taapas Agrawal's avatar Taapas Agrawal
Browse files

unshelve: changed Corruptedstate error msg from ui.warn to error.Abort

This changes the message type of Corruptedstate error in case of `hg unshelve --abort`
to error.Abort from warning message. This is done so as to avoid the return statement
after the warning.

Differential Revision: https://phab.mercurial-scm.org/D6636
parent 51e52a495214
No related branches found
No related tags found
No related merge requests found
......@@ -880,8 +880,4 @@
'operation')
raise error.Abort(msg, hint=hint)
elif abortf:
msg = _('could not read shelved state file, your working copy '
'may be in an unexpected state\nplease update to some '
'commit\n')
ui.warn(msg)
shelvedstate.clear(repo)
......@@ -887,5 +883,7 @@
shelvedstate.clear(repo)
return
raise error.Abort(_('could not read shelved state file, your '
'working copy may be in an unexpected state\n'
'please update to some commit\n'))
if abortf:
return unshelveabort(ui, repo, state, opts)
......
......@@ -696,5 +696,5 @@
Unshelve --abort works with a corrupted shelvedstate
$ hg unshelve --abort
could not read shelved state file, your working copy may be in an unexpected state
abort: could not read shelved state file, your working copy may be in an unexpected state
please update to some commit
......@@ -700,4 +700,6 @@
please update to some commit
[255]
Unshelve --abort fails with appropriate message if there's no unshelve in
progress
......
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