Mercurial > public > mercurial-scm > hg-stable
diff hgext/transplant.py @ 43909:d50b4ad1d4a5
transplant: use check_incompatible_arguments()
Differential Revision: https://phab.mercurial-scm.org/D7663
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 13 Dec 2019 14:12:14 -0800 |
parents | 96edd0c38740 |
children | d4c1501225c4 |
line wrap: on
line diff
--- a/hgext/transplant.py Fri Dec 13 14:31:51 2019 -0800 +++ b/hgext/transplant.py Fri Dec 13 14:12:14 2019 -0800 @@ -760,22 +760,14 @@ def checkopts(opts, revs): if opts.get(b'continue'): - if opts.get(b'branch') or opts.get(b'all') or opts.get(b'merge'): - raise error.Abort( - _( - b'--continue is incompatible with ' - b'--branch, --all and --merge' - ) - ) + cmdutil.check_incompatible_arguments( + opts, b'continue', b'branch', b'all', b'merge' + ) return if opts.get(b'stop'): - if opts.get(b'branch') or opts.get(b'all') or opts.get(b'merge'): - raise error.Abort( - _( - b'--stop is incompatible with ' - b'--branch, --all and --merge' - ) - ) + cmdutil.check_incompatible_arguments( + opts, b'stop', b'branch', b'all', b'merge' + ) return if not ( opts.get(b'source')