Mercurial > hg
changeset 44176:6744859ff3ee
merge: call hg.abortmerge() directly and return early
It's seem really weird to go through a lot of unrelated code before we
call `hg.merge(..., abort=True)` when we can just call
`hg.abortmerge()` and return early.
Differential Revision: https://phab.mercurial-scm.org/D7995
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 24 Jan 2020 16:05:11 -0800 |
parents | 2b6632d64328 |
children | 1850066f9e36 |
files | mercurial/commands.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Jan 24 16:00:54 2020 -0800 +++ b/mercurial/commands.py Fri Jan 24 16:05:11 2020 -0800 @@ -4857,6 +4857,8 @@ ) if node: raise error.Abort(_(b"cannot specify a node with --abort")) + return hg.abortmerge(repo.ui, repo) + if opts.get(b'rev') and node: raise error.Abort(_(b"please specify just one revision")) if not node: @@ -4865,7 +4867,7 @@ if node: node = scmutil.revsingle(repo, node).node() - if not node and not abort: + if not node: if ui.configbool(b'commands', b'merge.require-rev'): raise error.Abort( _( @@ -4898,7 +4900,6 @@ force=force, mergeforce=force, labels=labels, - abort=abort, )