changeset 22105:3efe3c2609e0 stable

revset: bookmark revset interprets 'literal:' prefix correctly (issue4329)
author Michael O'Connor <mkoconnor@gmail.com>
date Mon, 11 Aug 2014 23:45:08 -0400
parents 42b1344656f7
children e5dfa8689cf0
files mercurial/revset.py tests/test-bookmarks.t
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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]