diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py index 35ab6e39f482629701980092b61a1ec13874db70_bWVyY3VyaWFsL2Jvb2ttYXJrcy5weQ==..9acbe30953e8491e951b10ed4f52232136d5dfc5_bWVyY3VyaWFsL2Jvb2ttYXJrcy5weQ== 100644 --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -901,7 +901,7 @@ """ mark = mark.strip() if not mark: - raise error.Abort( + raise error.InputError( _(b"bookmark names cannot consist entirely of whitespace") ) scmutil.checknewlabel(repo, mark, b'bookmark') @@ -917,7 +917,7 @@ changes = [] for mark in names: if mark not in marks: - raise error.Abort(_(b"bookmark '%s' does not exist") % mark) + raise error.InputError(_(b"bookmark '%s' does not exist") % mark) if mark == repo._activebookmark: deactivate(repo) changes.append((mark, None)) @@ -937,7 +937,7 @@ marks = repo._bookmarks mark = checkformat(repo, new) if old not in marks: - raise error.Abort(_(b"bookmark '%s' does not exist") % old) + raise error.InputError(_(b"bookmark '%s' does not exist") % old) changes = [] for bm in marks.checkconflict(mark, force): changes.append((bm, None)) @@ -1041,7 +1041,7 @@ bmarks = {} for bmark in names or marks: if bmark not in marks: - raise error.Abort(_(b"bookmark '%s' does not exist") % bmark) + raise error.InputError(_(b"bookmark '%s' does not exist") % bmark) active = repo._activebookmark if bmark == active: prefix, label = b'*', activebookmarklabel diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t index 35ab6e39f482629701980092b61a1ec13874db70_dGVzdHMvdGVzdC1ib29rbWFya3MudA==..9acbe30953e8491e951b10ed4f52232136d5dfc5_dGVzdHMvdGVzdC1ib29rbWFya3MudA== 100644 --- a/tests/test-bookmarks.t +++ b/tests/test-bookmarks.t @@ -79,7 +79,7 @@ * X2 0:f7b1eb17ad24 $ hg bookmarks -l X A Y abort: bookmark 'A' does not exist - [255] + [10] $ hg bookmarks -l -r0 abort: cannot specify both --list and --rev [10] @@ -245,7 +245,7 @@ $ hg bookmark -m A B abort: bookmark 'A' does not exist - [255] + [10] rename to existent bookmark @@ -342,7 +342,7 @@ $ hg bookmark -d A abort: bookmark 'A' does not exist - [255] + [10] delete with --inactive @@ -385,8 +385,8 @@ $ hg bookmark ' > ' abort: bookmark names cannot consist entirely of whitespace - [255] + [10] $ hg bookmark -m Z ' > ' abort: bookmark names cannot consist entirely of whitespace @@ -389,8 +389,8 @@ $ hg bookmark -m Z ' > ' abort: bookmark names cannot consist entirely of whitespace - [255] + [10] bookmark with reserved name @@ -528,7 +528,7 @@ $ hg bookmark ' ' abort: bookmark names cannot consist entirely of whitespace - [255] + [10] $ hg bookmark -m Y ' ' abort: bookmark names cannot consist entirely of whitespace @@ -532,7 +532,7 @@ $ hg bookmark -m Y ' ' abort: bookmark names cannot consist entirely of whitespace - [255] + [10] invalid bookmark diff --git a/tests/test-http-permissions.t b/tests/test-http-permissions.t index 35ab6e39f482629701980092b61a1ec13874db70_dGVzdHMvdGVzdC1odHRwLXBlcm1pc3Npb25zLnQ=..9acbe30953e8491e951b10ed4f52232136d5dfc5_dGVzdHMvdGVzdC1odHRwLXBlcm1pc3Npb25zLnQ= 100644 --- a/tests/test-http-permissions.t +++ b/tests/test-http-permissions.t @@ -765,7 +765,7 @@ no bookmarks set $ hg bookmark -d bm abort: bookmark 'bm' does not exist - [255] + [10] $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=customwritenoperm' 405 push requires POST request @@ -806,7 +806,7 @@ no bookmarks set $ hg bookmark -d bm abort: bookmark 'bm' does not exist - [255] + [10] $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=customwritenoperm' 405 push requires POST request