##// END OF EJS Templates
bookmarks: reject --delete with --inactive which makes no sense...
Yuya Nishihara -
r39788:2d478b05 default
parent child Browse files
Show More
@@ -980,8 +980,8 b' def bookmark(ui, repo, *names, **opts):'
980 raise error.Abort(_("--rev is incompatible with --%s") % action)
980 raise error.Abort(_("--rev is incompatible with --%s") % action)
981 if names and action == 'active':
981 if names and action == 'active':
982 raise error.Abort(_("NAMES is incompatible with --active"))
982 raise error.Abort(_("NAMES is incompatible with --active"))
983 if inactive and action == 'active':
983 if inactive and action in {'delete', 'active'}:
984 raise error.Abort(_("--inactive is incompatible with --active"))
984 raise error.Abort(_("--inactive is incompatible with --%s") % action)
985 if not names and action in {'add', 'delete'}:
985 if not names and action in {'add', 'delete'}:
986 raise error.Abort(_("bookmark name required"))
986 raise error.Abort(_("bookmark name required"))
987
987
@@ -327,6 +327,12 b' delete nonexistent bookmark'
327 abort: bookmark 'A' does not exist
327 abort: bookmark 'A' does not exist
328 [255]
328 [255]
329
329
330 delete with --inactive
331
332 $ hg bookmark -d --inactive Y
333 abort: --inactive is incompatible with --delete
334 [255]
335
330 bookmark name with spaces should be stripped
336 bookmark name with spaces should be stripped
331
337
332 $ hg bookmark ' x y '
338 $ hg bookmark ' x y '
General Comments 0
You need to be logged in to leave comments. Login now