From patchwork Mon Dec 16 23:20:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7637: pathbomb: use cmdutil.check_at_most_one_arg() From: phabricator X-Patchwork-Id: 43871 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Mon, 16 Dec 2019 23:20:22 +0000 martinvonz retitled this revision from "pathbomb: use cmdutil.check_unique_argument()" to "pathbomb: use cmdutil.check_at_most_one_arg()". martinvonz updated this revision to Diff 18763. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7637?vs=18672&id=18763 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7637/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7637 AFFECTED FILES hgext/patchbomb.py CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-devel diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py --- a/hgext/patchbomb.py +++ b/hgext/patchbomb.py @@ -767,8 +767,7 @@ b" do not re-specify --outgoing" ) ) - if rev and bookmark: - raise error.Abort(_(b"-r and -B are mutually exclusive")) + cmdutil.check_at_most_one_arg(opts, b'rev', b'bookmark') if outgoing or bundle: if len(revs) > 1: