# HG changeset patch # User Martin von Zweigbergk # Date 2019-12-12 23:51:09 # Node ID dda49ec2b54a49759f4c785648316d223881ef95 # Parent 3781da40eaa676cf05182d18bbec4bb06b029eb0 fix: use cmdutil.check_at_most_one_arg() Differential Revision: https://phab.mercurial-scm.org/D7638 diff --git a/hgext/fix.py b/hgext/fix.py --- a/hgext/fix.py +++ b/hgext/fix.py @@ -249,9 +249,8 @@ def fix(ui, repo, *pats, **opts): override this default behavior, though it is not usually desirable to do so. """ opts = pycompat.byteskwargs(opts) + cmdutil.check_at_most_one_arg(opts, b'all', b'rev') if opts[b'all']: - if opts[b'rev']: - raise error.Abort(_(b'cannot specify both "--rev" and "--all"')) opts[b'rev'] = [b'not public() and not obsolete()'] opts[b'working_dir'] = True with repo.wlock(), repo.lock(), repo.transaction(b'fix'):