##// END OF EJS Templates
template: add 'current' to scope during {bookmarks % ...}...
Durham Goode -
r20520:5c65ee41 default
parent child Browse files
Show More
@@ -195,8 +195,12 b' def showbookmarks(**args):'
195 """:bookmarks: List of strings. Any bookmarks associated with the
195 """:bookmarks: List of strings. Any bookmarks associated with the
196 changeset.
196 changeset.
197 """
197 """
198 repo = args['ctx']._repo
198 bookmarks = args['ctx'].bookmarks()
199 bookmarks = args['ctx'].bookmarks()
199 return showlist('bookmark', bookmarks, **args)
200 hybrid = showlist('bookmark', bookmarks, **args)
201 for value in hybrid.values:
202 value['current'] = repo._bookmarkcurrent
203 return hybrid
200
204
201 def showchildren(**args):
205 def showchildren(**args):
202 """:children: List of strings. The children of the changeset."""
206 """:children: List of strings. The children of the changeset."""
@@ -1676,3 +1676,10 b' Test revset function'
1676 Rev: 0
1676 Rev: 0
1677 Ancestor: 0
1677 Ancestor: 0
1678
1678
1679 Test current bookmark templating
1680
1681 $ hg book foo
1682 $ hg book bar
1683 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, current, \"*\")} '}\n"
1684 1 bar* foo
1685 0
General Comments 0
You need to be logged in to leave comments. Login now