Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 44725:16c361152133
graft: exit 1 on conflicts, like merge
It's more consistent, and makes it nicer to script around hg if you
don't have to ignore exit code 255, which is the error code for
basically everything in hg.
Differential Revision: https://phab.mercurial-scm.org/D8423
author | Valentin Gatien-Baron <vgatien-baron@janestreet.com> |
---|---|
date | Tue, 14 Apr 2020 19:09:56 -0400 |
parents | 1b8fd4af3318 |
children | e5043679bfcc a9ff0742c8ea |
line wrap: on
line diff
--- 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