mercurial/commands.py
changeset 44725 16c361152133
parent 44687 1b8fd4af3318
child 44800 a9ff0742c8ea
child 44906 e5043679bfcc
--- a/mercurial/commands.py	Fri Apr 10 19:58:34 2020 +0200
+++ b/mercurial/commands.py	Tue Apr 14 19:09:56 2020 -0400
@@ -2951,7 +2951,7 @@
 
     See :hg:`help revisions` for more about specifying revisions.
 
-    Returns 0 on successful completion.
+    Returns 0 on successful completion, 1 if there are unresolved files.
     '''
     with repo.wlock():
         return _dograft(ui, repo, *revs, **opts)
@@ -3212,10 +3212,9 @@
                 statedata[b'nodes'] = nodes
                 stateversion = 1
                 graftstate.save(stateversion, statedata)
-                hint = _(b"use 'hg resolve' and 'hg graft --continue'")
-                raise error.Abort(
-                    _(b"unresolved conflicts, can't continue"), hint=hint
-                )
+                ui.error(_(b"abort: unresolved conflicts, can't continue\n"))
+                ui.error(_(b"(use 'hg resolve' and 'hg graft --continue')\n"))
+                return 1
         else:
             cont = False