##// END OF EJS Templates
bookmarks: use cmdutil.check_incompatible_arguments() for action+rev...
Martin von Zweigbergk -
r44353:5cde1648 default
parent child Browse files
Show More
@@ -1228,7 +1228,7 b' def bookmark(ui, repo, *names, **opts):'
1228
1228
1229 action = cmdutil.check_at_most_one_arg(opts, b'delete', b'rename', b'list')
1229 action = cmdutil.check_at_most_one_arg(opts, b'delete', b'rename', b'list')
1230 if action:
1230 if action:
1231 pass
1231 cmdutil.check_incompatible_arguments(opts, action, b'rev')
1232 elif names or rev:
1232 elif names or rev:
1233 action = b'add'
1233 action = b'add'
1234 elif inactive:
1234 elif inactive:
@@ -1236,8 +1236,6 b' def bookmark(ui, repo, *names, **opts):'
1236 else:
1236 else:
1237 action = b'list'
1237 action = b'list'
1238
1238
1239 if rev and action in {b'delete', b'rename', b'list'}:
1240 raise error.Abort(_(b"--rev is incompatible with --%s") % action)
1241 if inactive and action in {b'delete', b'list'}:
1239 if inactive and action in {b'delete', b'list'}:
1242 raise error.Abort(_(b"--inactive is incompatible with --%s") % action)
1240 raise error.Abort(_(b"--inactive is incompatible with --%s") % action)
1243 if not names and action in {b'add', b'delete'}:
1241 if not names and action in {b'add', b'delete'}:
@@ -81,7 +81,7 b' list bookmarks'
81 abort: bookmark 'A' does not exist
81 abort: bookmark 'A' does not exist
82 [255]
82 [255]
83 $ hg bookmarks -l -r0
83 $ hg bookmarks -l -r0
84 abort: --rev is incompatible with --list
84 abort: cannot specify both --list and --rev
85 [255]
85 [255]
86 $ hg bookmarks -l --inactive
86 $ hg bookmarks -l --inactive
87 abort: --inactive is incompatible with --list
87 abort: --inactive is incompatible with --list
@@ -479,11 +479,11 b' incompatible options'
479 [255]
479 [255]
480
480
481 $ hg bookmark -r 1 -d Z
481 $ hg bookmark -r 1 -d Z
482 abort: --rev is incompatible with --delete
482 abort: cannot specify both --delete and --rev
483 [255]
483 [255]
484
484
485 $ hg bookmark -r 1 -m Z Y
485 $ hg bookmark -r 1 -m Z Y
486 abort: --rev is incompatible with --rename
486 abort: cannot specify both --rename and --rev
487 [255]
487 [255]
488
488
489 force bookmark with existing name
489 force bookmark with existing name
General Comments 0
You need to be logged in to leave comments. Login now