Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 39330:1eb370761fa0
revset: expand bookmark(.) to the active bookmark
We do that in several places. I'm not pretty sure if "literal:." should be
expanded or not, so it's disabled for now.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 25 Aug 2018 20:16:28 +0900 |
parents | 31c0ee6eb0ac |
children | 85a474adaf26 |
line wrap: on
line diff
--- a/mercurial/revset.py Sat Aug 25 15:33:15 2018 +0900 +++ b/mercurial/revset.py Sat Aug 25 20:16:28 2018 +0900 @@ -454,6 +454,8 @@ kind, pattern, matcher = stringutil.stringmatcher(bm) bms = set() if kind == 'literal': + if bm == pattern: + pattern = repo._bookmarks.expandname(pattern) bmrev = repo._bookmarks.get(pattern, None) if not bmrev: raise error.RepoLookupError(_("bookmark '%s' does not exist")