# HG changeset patch # User Brendan Cully # Date 1161721861 25200 # Node ID e0db0b7934f2d21b396b236ada6ebd9de70d560d # Parent 776c317566b62dc9c846bb86ab09ce1e99e2f0dc hgweb: add heads to gitweb summary diff -r 776c317566b6 -r e0db0b7934f2 mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Tue Oct 24 13:17:41 2006 -0700 +++ b/mercurial/hgweb/hgweb_mod.py Tue Oct 24 13:31:01 2006 -0700 @@ -527,6 +527,23 @@ date = t) parity += 1 + def heads(**map): + parity = 0 + count = 0 + + for node in self.repo.heads(): + count += 1 + if count > 10: + break; + + ctx = self.repo.changectx(node) + + yield {'parity': self.stripes(parity), + 'branch': ctx.branch(), + 'node': hex(node), + 'date': ctx.date()} + parity += 1 + def changelist(**map): parity = 0 cl = self.repo.changelog @@ -560,6 +577,7 @@ self.repo.ui.config("web", "author", "unknown")), # also lastchange = cl.read(cl.tip())[2], tags = tagentries, + heads = heads, shortlog = changelist, node = hex(cl.tip()), archives=self.archivelist("tip")) diff -r 776c317566b6 -r e0db0b7934f2 templates/gitweb/map --- a/templates/gitweb/map Tue Oct 24 13:17:41 2006 -0700 +++ b/templates/gitweb/map Tue Oct 24 13:31:01 2006 -0700 @@ -39,6 +39,7 @@ fileannotatechild = 'child {rev}:{node|short}' tags = tags.tmpl tagentry = '#date|age# ago#tag|escape#changeset | changelog | manifest' +headentry = '{date|age} ago{node|short}{branch|escape}changeset | changelog | manifest' diffblock = '
#lines#
' changelogtag = 'tag:#tag|escape#' changesettag = 'tag#tag|escape#' diff -r 776c317566b6 -r e0db0b7934f2 templates/gitweb/summary.tmpl --- a/templates/gitweb/summary.tmpl Tue Oct 24 13:17:41 2006 -0700 +++ b/templates/gitweb/summary.tmpl Tue Oct 24 13:31:01 2006 -0700 @@ -36,4 +36,12 @@ ... +
heads
+ +{heads%headentry} + + + +
...
#footer#