Patchwork D7637: pathbomb: use cmdutil.check_unique_argument()

login
register
mail settings
Submitter phabricator
Date Dec. 13, 2019, 7:56 a.m.
Message ID <differential-rev-PHID-DREV-nts5o3aqtz2dkdjyr4vg-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43780/
State Superseded
Headers show

Comments

phabricator - Dec. 13, 2019, 7:56 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D7637

AFFECTED FILES
  hgext/patchbomb.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel
phabricator - Dec. 17, 2019, 7:26 a.m.
pulkit added a comment.


  Renaming `pathbomb` to `patchbomb` in message title.

REPOSITORY
  rHG Mercurial

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7637/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7637

To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

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_unique_argument(opts, b'rev', b'bookmark')
 
     if outgoing or bundle:
         if len(revs) > 1: