# HG changeset patch # User Yuya Nishihara # Date 1535195967 -32400 # Node ID fc54a290b4b03071dae7f00b0975216421ae3257 # Parent 1eb370761fa09e9b5dc761eb927104d4f90f910e bookmarks: adjust exception type so present(bookmark(.)) works as expected diff -r 1eb370761fa0 -r fc54a290b4b0 mercurial/bookmarks.py --- a/mercurial/bookmarks.py Sat Aug 25 20:16:28 2018 +0900 +++ b/mercurial/bookmarks.py Sat Aug 25 20:19:27 2018 +0900 @@ -240,7 +240,7 @@ if self.active: return self.active else: - raise error.Abort(_("no active bookmark")) + raise error.RepoLookupError(_("no active bookmark")) return bname def checkconflict(self, mark, force=False, target=None): diff -r 1eb370761fa0 -r fc54a290b4b0 tests/test-bookmarks-pushpull.t --- a/tests/test-bookmarks-pushpull.t Sat Aug 25 20:16:28 2018 +0900 +++ b/tests/test-bookmarks-pushpull.t Sat Aug 25 20:19:27 2018 +0900 @@ -345,7 +345,7 @@ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (leaving bookmark V) $ hg push -B . ../a - abort: no active bookmark + abort: no active bookmark! [255] $ hg update -r V 0 files updated, 0 files merged, 1 files removed, 0 files unresolved diff -r 1eb370761fa0 -r fc54a290b4b0 tests/test-bookmarks.t --- a/tests/test-bookmarks.t Sat Aug 25 20:16:28 2018 +0900 +++ b/tests/test-bookmarks.t Sat Aug 25 20:19:27 2018 +0900 @@ -172,12 +172,9 @@ $ hg bookmark --inactive $ hg log -r 'bookmark(.)' - abort: no active bookmark + abort: no active bookmark! [255] -BUG: this should be resolved to an empty set: $ hg log -r 'present(bookmark(.))' - abort: no active bookmark - [255] $ hg log -r 'bookmark(unknown)' abort: bookmark 'unknown' does not exist! @@ -263,7 +260,7 @@ $ hg book rename-me $ hg book -i rename-me $ hg book -m . renamed - abort: no active bookmark + abort: no active bookmark! [255] $ hg up -q Y $ hg book -d rename-me @@ -283,7 +280,7 @@ $ hg book delete-me $ hg book -i delete-me $ hg book -d . - abort: no active bookmark + abort: no active bookmark! [255] $ hg up -q Y $ hg book -d delete-me