D7636: export: use cmdutil.check_at_most_one_arg()

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Dec 17 02:58:59 EST 2019


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

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:



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


More information about the Mercurial-devel mailing list