Mercurial > hg
comparison mercurial/commands.py @ 45739:693da1b928af
backout: leverage cmdutil.check_incompatible_arguments()
Differential Revision: https://phab.mercurial-scm.org/D9216
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 15 Oct 2020 21:44:03 -0700 |
parents | 03690079d7dd |
children | d1cabce5ef05 |
comparison
equal
deleted
inserted
replaced
45738:5df1655edf42 | 45739:693da1b928af |
---|---|
767 with repo.wlock(), repo.lock(): | 767 with repo.wlock(), repo.lock(): |
768 return _dobackout(ui, repo, node, rev, **opts) | 768 return _dobackout(ui, repo, node, rev, **opts) |
769 | 769 |
770 | 770 |
771 def _dobackout(ui, repo, node=None, rev=None, **opts): | 771 def _dobackout(ui, repo, node=None, rev=None, **opts): |
772 cmdutil.check_incompatible_arguments(opts, 'no_commit', ['commit', 'merge']) | |
772 opts = pycompat.byteskwargs(opts) | 773 opts = pycompat.byteskwargs(opts) |
773 if opts.get(b'commit') and opts.get(b'no_commit'): | |
774 raise error.Abort(_(b"cannot use --commit with --no-commit")) | |
775 if opts.get(b'merge') and opts.get(b'no_commit'): | |
776 raise error.Abort(_(b"cannot use --merge with --no-commit")) | |
777 | 774 |
778 if rev and node: | 775 if rev and node: |
779 raise error.Abort(_(b"please specify just one revision")) | 776 raise error.Abort(_(b"please specify just one revision")) |
780 | 777 |
781 if not rev: | 778 if not rev: |