Commit 1cdba9dd authored by Martin von Zweigbergk's avatar Martin von Zweigbergk

commit: leverage cmdutil.check_incompatible_arguments()

Differential Revision: https://phab.mercurial-scm.org/D9218
parent 84ce9ffc95ad
......@@ -2015,8 +2015,7 @@ def _docommit(ui, repo, *pats, **opts):
opts = pycompat.byteskwargs(opts)
if opts.get(b'subrepos'):
if opts.get(b'amend'):
raise error.Abort(_(b'cannot amend with --subrepos'))
cmdutil.check_incompatible_arguments(opts, b'subrepos', [b'amend'])
# Let --subrepos on the command line override config setting.
ui.setconfig(b'ui', b'commitsubrepos', True, b'commit')
......
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