changeset 43896:3781da40eaa6

patchbomb: use cmdutil.check_at_most_one_arg() Differential Revision: https://phab.mercurial-scm.org/D7637
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 17 Dec 2019 10:26:44 +0300
parents 287556e71f85
children dda49ec2b54a
files hgext/patchbomb.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/patchbomb.py	Thu Dec 12 15:48:48 2019 -0800
+++ b/hgext/patchbomb.py	Tue Dec 17 10:26:44 2019 +0300
@@ -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: