Mercurial > public > mercurial-scm > hg-stable
diff hgext/rebase.py @ 44269:d4c1501225c4
cmdutil: change check_incompatible_arguments() *arg to single iterable
This makes it clearer on the call-sites that the first argument is
special. Thanks to Yuya for the suggestion.
Differential Revision: https://phab.mercurial-scm.org/D8018
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 27 Jan 2020 09:14:19 -0800 |
parents | 1cb7ae9b0071 |
children | 3d2de64c49d2 |
line wrap: on
line diff
--- a/hgext/rebase.py Mon Jan 27 12:38:59 2020 -0800 +++ b/hgext/rebase.py Mon Jan 27 09:14:19 2020 -0800 @@ -1011,10 +1011,10 @@ action = cmdutil.check_at_most_one_arg(opts, b'abort', b'stop', b'continue') if action: cmdutil.check_incompatible_arguments( - opts, action, b'confirm', b'dry_run' + opts, action, [b'confirm', b'dry_run'] ) cmdutil.check_incompatible_arguments( - opts, action, b'rev', b'source', b'base', b'dest' + opts, action, [b'rev', b'source', b'base', b'dest'] ) cmdutil.check_at_most_one_arg(opts, b'confirm', b'dry_run') cmdutil.check_at_most_one_arg(opts, b'rev', b'source', b'base') @@ -1028,7 +1028,7 @@ if opts.get(b'auto_orphans'): disallowed_opts = set(opts) - {b'auto_orphans'} cmdutil.check_incompatible_arguments( - opts, b'auto_orphans', *disallowed_opts + opts, b'auto_orphans', disallowed_opts ) userrevs = list(repo.revs(opts.get(b'auto_orphans')))