diff mercurial/templatekw.py @ 13386:f78bc5ddbe4f

templater: add bookmarks to templates and default output as bookmarks are not dispalyed as tags anymore, we add a bookmark label to the changeset printer.
author David Soria Parra <dsp@php.net>
date Fri, 11 Feb 2011 19:47:39 +0100
parents d79fdff55627
children 2e80d495592a
line wrap: on
line diff
--- a/mercurial/templatekw.py	Fri Feb 11 19:44:17 2011 +0100
+++ b/mercurial/templatekw.py	Fri Feb 11 19:47:39 2011 +0100
@@ -153,6 +153,10 @@
     if branch != 'default':
         return showlist('branch', [branch], plural='branches', **args)
 
+def showbookmarks(**args):
+    bookmarks = args['ctx'].bookmarks()
+    return showlist('bookmark', bookmarks, **args)
+
 def showchildren(**args):
     ctx = args['ctx']
     childrevs = ['%d:%s' % (cctx, cctx) for cctx in ctx.children()]
@@ -252,6 +256,7 @@
     'author': showauthor,
     'branch': showbranch,
     'branches': showbranches,
+    'bookmarks': showbookmarks,
     'children': showchildren,
     'date': showdate,
     'desc': showdescription,