--- a/mercurial/revset.py Mon Aug 11 13:10:00 2014 -0500
+++ b/mercurial/revset.py Mon Aug 11 23:45:08 2014 -0400
@@ -449,7 +449,7 @@
_('the argument to bookmark must be a string'))
kind, pattern, matcher = _stringmatcher(bm)
if kind == 'literal':
- bmrev = repo._bookmarks.get(bm, None)
+ bmrev = repo._bookmarks.get(pattern, None)
if not bmrev:
raise util.Abort(_("bookmark '%s' does not exist") % bm)
bmrev = repo[bmrev].rev()
--- a/tests/test-bookmarks.t Mon Aug 11 13:10:00 2014 -0500
+++ b/tests/test-bookmarks.t Mon Aug 11 23:45:08 2014 -0400
@@ -98,6 +98,14 @@
date: Thu Jan 01 00:00:00 1970 +0000
summary: 1
+ $ hg log -r 'bookmark("literal:X")'
+ changeset: 0:f7b1eb17ad24
+ bookmark: X
+ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: 0
+
+
$ hg log -r 'bookmark(unknown)'
abort: bookmark 'unknown' does not exist
[255]