D7662: bookmarks: use check_incompatible_arguments() for inactive+action
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Tue Dec 17 08:01:38 UTC 2019
Closed by commit rHGe623ad1b4800: bookmarks: use check_incompatible_arguments() for inactive+action (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/D7662?vs=18776&id=18797
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7662/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7662
AFFECTED FILES
mercurial/commands.py
tests/test-bookmarks.t
CHANGE DETAILS
diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t
--- a/tests/test-bookmarks.t
+++ b/tests/test-bookmarks.t
@@ -84,7 +84,7 @@
abort: cannot specify both --list and --rev
[255]
$ hg bookmarks -l --inactive
- abort: --inactive is incompatible with --list
+ abort: cannot specify both --inactive and --list
[255]
$ hg log -T '{bookmarks % "{rev} {bookmark}\n"}'
@@ -347,7 +347,7 @@
delete with --inactive
$ hg bookmark -d --inactive Y
- abort: --inactive is incompatible with --delete
+ abort: cannot specify both --inactive and --delete
[255]
bookmark name with spaces should be stripped
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1236,8 +1236,7 @@
else:
action = b'list'
- if inactive and action in {b'delete', b'list'}:
- raise error.Abort(_(b"--inactive is incompatible with --%s") % action)
+ cmdutil.check_incompatible_arguments(opts, b'inactive', b'delete', b'list')
if not names and action in {b'add', b'delete'}:
raise error.Abort(_(b"bookmark name required"))
To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list