##// END OF EJS Templates
errors: raise InputError on bad bookmark argument...
Martin von Zweigbergk -
r46525:9acbe309 default
parent child Browse files
Show More
@@ -901,7 +901,7 b' def checkformat(repo, mark):'
901 901 """
902 902 mark = mark.strip()
903 903 if not mark:
904 raise error.Abort(
904 raise error.InputError(
905 905 _(b"bookmark names cannot consist entirely of whitespace")
906 906 )
907 907 scmutil.checknewlabel(repo, mark, b'bookmark')
@@ -917,7 +917,7 b' def delete(repo, tr, names):'
917 917 changes = []
918 918 for mark in names:
919 919 if mark not in marks:
920 raise error.Abort(_(b"bookmark '%s' does not exist") % mark)
920 raise error.InputError(_(b"bookmark '%s' does not exist") % mark)
921 921 if mark == repo._activebookmark:
922 922 deactivate(repo)
923 923 changes.append((mark, None))
@@ -937,7 +937,7 b' def rename(repo, tr, old, new, force=Fal'
937 937 marks = repo._bookmarks
938 938 mark = checkformat(repo, new)
939 939 if old not in marks:
940 raise error.Abort(_(b"bookmark '%s' does not exist") % old)
940 raise error.InputError(_(b"bookmark '%s' does not exist") % old)
941 941 changes = []
942 942 for bm in marks.checkconflict(mark, force):
943 943 changes.append((bm, None))
@@ -1041,7 +1041,7 b' def printbookmarks(ui, repo, fm, names=N'
1041 1041 bmarks = {}
1042 1042 for bmark in names or marks:
1043 1043 if bmark not in marks:
1044 raise error.Abort(_(b"bookmark '%s' does not exist") % bmark)
1044 raise error.InputError(_(b"bookmark '%s' does not exist") % bmark)
1045 1045 active = repo._activebookmark
1046 1046 if bmark == active:
1047 1047 prefix, label = b'*', activebookmarklabel
@@ -79,7 +79,7 b' list bookmarks'
79 79 * X2 0:f7b1eb17ad24
80 80 $ hg bookmarks -l X A Y
81 81 abort: bookmark 'A' does not exist
82 [255]
82 [10]
83 83 $ hg bookmarks -l -r0
84 84 abort: cannot specify both --list and --rev
85 85 [10]
@@ -245,7 +245,7 b' rename nonexistent bookmark'
245 245
246 246 $ hg bookmark -m A B
247 247 abort: bookmark 'A' does not exist
248 [255]
248 [10]
249 249
250 250 rename to existent bookmark
251 251
@@ -342,7 +342,7 b' delete nonexistent bookmark'
342 342
343 343 $ hg bookmark -d A
344 344 abort: bookmark 'A' does not exist
345 [255]
345 [10]
346 346
347 347 delete with --inactive
348 348
@@ -385,12 +385,12 b' reject bookmark name with newline'
385 385 $ hg bookmark '
386 386 > '
387 387 abort: bookmark names cannot consist entirely of whitespace
388 [255]
388 [10]
389 389
390 390 $ hg bookmark -m Z '
391 391 > '
392 392 abort: bookmark names cannot consist entirely of whitespace
393 [255]
393 [10]
394 394
395 395 bookmark with reserved name
396 396
@@ -528,11 +528,11 b' bookmark name with whitespace only'
528 528
529 529 $ hg bookmark ' '
530 530 abort: bookmark names cannot consist entirely of whitespace
531 [255]
531 [10]
532 532
533 533 $ hg bookmark -m Y ' '
534 534 abort: bookmark names cannot consist entirely of whitespace
535 [255]
535 [10]
536 536
537 537 invalid bookmark
538 538
@@ -765,7 +765,7 b' Attempting a write command with HTTP GET'
765 765 no bookmarks set
766 766 $ hg bookmark -d bm
767 767 abort: bookmark 'bm' does not exist
768 [255]
768 [10]
769 769
770 770 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=customwritenoperm'
771 771 405 push requires POST request
@@ -806,7 +806,7 b' Attempting a write command with an unkno'
806 806 no bookmarks set
807 807 $ hg bookmark -d bm
808 808 abort: bookmark 'bm' does not exist
809 [255]
809 [10]
810 810
811 811 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=customwritenoperm'
812 812 405 push requires POST request
General Comments 0
You need to be logged in to leave comments. Login now