revset: strip off "literal:" prefix from bookmark not found error
This is what branch() and tag() do.
--- a/mercurial/revset.py Wed Oct 07 23:00:29 2015 +0900
+++ b/mercurial/revset.py Wed Oct 07 23:04:31 2015 +0900
@@ -696,7 +696,7 @@
bmrev = repo._bookmarks.get(pattern, None)
if not bmrev:
raise error.RepoLookupError(_("bookmark '%s' does not exist")
- % bm)
+ % pattern)
bms.add(repo[bmrev].rev())
else:
matchrevs = set()
--- a/tests/test-bookmarks.t Wed Oct 07 23:00:29 2015 +0900
+++ b/tests/test-bookmarks.t Wed Oct 07 23:04:31 2015 +0900
@@ -135,6 +135,9 @@
$ hg log -r 'bookmark(unknown)'
abort: bookmark 'unknown' does not exist!
[255]
+ $ hg log -r 'bookmark("literal:unknown")'
+ abort: bookmark 'unknown' does not exist!
+ [255]
$ hg log -r 'bookmark("re:unknown")'
abort: no bookmarks exist that match 'unknown'!
[255]