Commit bad11543 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk

backout: leverage cmdutil.check_incompatible_arguments()

Differential Revision: https://phab.mercurial-scm.org/D9216
parent 5df1655edf42
......@@ -769,11 +769,8 @@ def backout(ui, repo, node=None, rev=None, **opts):
def _dobackout(ui, repo, node=None, rev=None, **opts):
cmdutil.check_incompatible_arguments(opts, 'no_commit', ['commit', 'merge'])
opts = pycompat.byteskwargs(opts)
if opts.get(b'commit') and opts.get(b'no_commit'):
raise error.Abort(_(b"cannot use --commit with --no-commit"))
if opts.get(b'merge') and opts.get(b'no_commit'):
raise error.Abort(_(b"cannot use --merge with --no-commit"))
if rev and node:
raise error.Abort(_(b"please specify just one revision"))
......
......@@ -804,5 +804,5 @@ Test usage of `hg resolve` in case of conflict
--no-commit can't be used with --merge
$ hg backout --merge --no-commit 2
abort: cannot use --merge with --no-commit
abort: cannot specify both --no-commit and --merge
[255]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment