From patchwork Tue Dec 17 07:58:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7636: export: use cmdutil.check_at_most_one_arg() From: phabricator X-Patchwork-Id: 43902 Message-Id: <9541123b3e334ba151402dac81a388eb@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Tue, 17 Dec 2019 07:58:59 +0000 Closed by commit rHG287556e71f85: export: 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/D7636?vs=18762&id=18790 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7636/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7636 AFFECTED FILES mercurial/commands.py CHANGE DETAILS To: martinvonz, #hg-reviewers, pulkit Cc: mercurial-devel diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2610,8 +2610,7 @@ bookmark = opts.get(b'bookmark') changesets += tuple(opts.get(b'rev', [])) - if bookmark and changesets: - raise error.Abort(_(b"-r and -B are mutually exclusive")) + cmdutil.check_at_most_one_arg(opts, b'rev', b'bookmark') if bookmark: if bookmark not in repo._bookmarks: