hgext/rebase.py
branchstable
changeset 17026 f8af57c00a29
parent 16551 ebf6d38c9063
child 17027 6c05eebd9fab
child 17046 4116504d1ec4
--- a/hgext/rebase.py	Tue Jun 12 09:31:04 2012 -0400
+++ b/hgext/rebase.py	Mon Jun 18 11:16:24 2012 +0200
@@ -565,10 +565,11 @@
 def abort(repo, originalwd, target, state):
     'Restore the repository to its original state'
     dstates = [s for s in state.values() if s != nullrev]
-    if [d for d in dstates if not repo[d].mutable()]:
-        repo.ui.warn(_("warning: immutable rebased changeset detected, "
-                       "can't abort\n"))
-        return -1
+    immutable = [d for d in dstates if not repo[d].mutable()]
+    if immutable:
+        raise util.Abort(_("can't abort rebase due to immutable changesets %s")
+                         % ', '.join(str(repo[r]) for r in immutable),
+                         hint=_('see hg help phases for details'))
 
     descendants = set()
     if dstates: