From patchwork Tue Dec 17 07:58:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7638: fix: use cmdutil.check_at_most_one_arg() From: phabricator X-Patchwork-Id: 43901 Message-Id: <952e4decd4b4a917205c06af2bbd56d5@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Tue, 17 Dec 2019 07:58:51 +0000 Closed by commit rHGdda49ec2b54a: fix: use cmdutil.check_at_most_one_arg() (authored by martinvonz). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7638?vs=18764&id=18792 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7638/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7638 AFFECTED FILES hgext/fix.py CHANGE DETAILS To: martinvonz, #hg-reviewers, pulkit Cc: mercurial-devel diff --git a/hgext/fix.py b/hgext/fix.py --- a/hgext/fix.py +++ b/hgext/fix.py @@ -249,9 +249,8 @@ 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'):