Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 45010:c63a297fb964
graft: leverage cmdutil.check_incompatible_arguments() for --no-commit
Differential Revision: https://phab.mercurial-scm.org/D8668
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 25 Jun 2020 13:29:05 -0700 |
parents | 7d494425167c |
children | 6118ad07b98d |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Jun 25 13:27:37 2020 -0700 +++ b/mercurial/commands.py Thu Jun 25 13:29:05 2020 -0700 @@ -2986,22 +2986,11 @@ cont = False if opts.get(b'no_commit'): - if opts.get(b'edit'): - raise error.Abort( - _(b"cannot specify --no-commit and --edit together") - ) - if opts.get(b'currentuser'): - raise error.Abort( - _(b"cannot specify --no-commit and --currentuser together") - ) - if opts.get(b'currentdate'): - raise error.Abort( - _(b"cannot specify --no-commit and --currentdate together") - ) - if opts.get(b'log'): - raise error.Abort( - _(b"cannot specify --no-commit and --log together") - ) + cmdutil.check_incompatible_arguments( + opts, + b'no_commit', + [b'edit', b'currentuser', b'currentdate', b'log'], + ) graftstate = statemod.cmdstate(repo, b'graftstate')