mercurial/shelve.py
changeset 42598 8ddfdcce4bd6
parent 42560 70f1a84d0794
child 42599 3fb0493812c0
--- a/mercurial/shelve.py	Thu Jun 20 01:08:56 2019 +0530
+++ b/mercurial/shelve.py	Wed Jul 10 23:11:55 2019 +0530
@@ -880,12 +880,10 @@
                          '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)
-            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)