##// END OF EJS Templates
bookmarks: use cmdutil.check_at_most_one_arg() for action...
Martin von Zweigbergk -
r44352:3b50de91 default
parent child Browse files
Show More
@@ -1226,13 +1226,9 b' def bookmark(ui, repo, *names, **opts):'
1226 1226 rev = opts.get(b'rev')
1227 1227 inactive = opts.get(b'inactive') # meaning add/rename to inactive bookmark
1228 1228
1229 selactions = [k for k in [b'delete', b'rename', b'list'] if opts.get(k)]
1230 if len(selactions) > 1:
1231 raise error.Abort(
1232 _(b'--%s and --%s are incompatible') % tuple(selactions[:2])
1233 )
1234 if selactions:
1235 action = selactions[0]
1229 action = cmdutil.check_at_most_one_arg(opts, b'delete', b'rename', b'list')
1230 if action:
1231 pass
1236 1232 elif names or rev:
1237 1233 action = b'add'
1238 1234 elif inactive:
@@ -475,7 +475,7 b' incompatible options'
475 475 $ cd repo
476 476
477 477 $ hg bookmark -m Y -d Z
478 abort: --delete and --rename are incompatible
478 abort: cannot specify both --delete and --rename
479 479 [255]
480 480
481 481 $ hg bookmark -r 1 -d Z
General Comments 0
You need to be logged in to leave comments. Login now