# HG changeset patch # User mpm@selenic.com # Date 2005-07-01 22:46:31 # Node ID e8fd41110dce25ee4b389c891bf7dbc0a90c1f62 # Parent 87f37e61d0db27c3963bc64baa49bd396ad43e46 [PATCH] Add tags to hgweb -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH] Add tags to hgweb From: Goffredo Baroncelli manifest hash: 3a59c363799c974b042dbb55f943d830feb1b34f -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCxcfHywK+sNU5EO8RAgEKAJ40SRMOyBOkbS8QU2MIBUzBnhu5AwCbBDjR M+gaWyqzqOBzO1r+9zpb37k= =l1pL -----END PGP SIGNATURE----- diff --git a/mercurial/hgweb.py b/mercurial/hgweb.py --- a/mercurial/hgweb.py +++ b/mercurial/hgweb.py @@ -155,6 +155,10 @@ class hgweb: if node != hex(nullid): yield self.t(t1, node = node, rev = rev, **args) + def showtag(self, t1, node=nullid, **args): + for t in self.repo.nodetags(node): + yield self.t(t1, tag = t, **args) + def diff(self, node1, node2, files): def filterfiles(list, files): l = [ x for x in list if x in files ] @@ -259,6 +263,7 @@ class hgweb: hex(p1), cl.rev(p1)), parent2 = self.parent("changelogparent", hex(p2), cl.rev(p2)), + changelogtag = self.showtag("changelogtag",n), p1 = hex(p1), p2 = hex(p2), p1rev = cl.rev(p1), p2rev = cl.rev(p2), manifest = hex(changes[0]), @@ -326,6 +331,7 @@ class hgweb: hex(p1), cl.rev(p1)), parent2 = self.parent("changelogparent", hex(p2), cl.rev(p2)), + changelogtag = self.showtag("changelogtag",n), p1 = hex(p1), p2 = hex(p2), p1rev = cl.rev(p1), p2rev = cl.rev(p2), manifest = hex(changes[0]), @@ -376,6 +382,7 @@ class hgweb: hex(p1), cl.rev(p1)), parent2 = self.parent("changesetparent", hex(p2), cl.rev(p2)), + changesettag = self.showtag("changesettag",n), p1 = hex(p1), p2 = hex(p2), p1rev = cl.rev(p1), p2rev = cl.rev(p2), manifest = hex(changes[0]), diff --git a/templates/changelogentry.tmpl b/templates/changelogentry.tmpl --- a/templates/changelogentry.tmpl +++ b/templates/changelogentry.tmpl @@ -8,6 +8,7 @@ #node|short# #parent1# #parent2# +#changelogtag# author:  #author|obfuscate# diff --git a/templates/changeset.tmpl b/templates/changeset.tmpl --- a/templates/changeset.tmpl +++ b/templates/changeset.tmpl @@ -18,6 +18,7 @@ #node|short# #parent1# #parent2# +#changesettag# manifest: #manifest|short# diff --git a/templates/map b/templates/map --- a/templates/map +++ b/templates/map @@ -30,3 +30,5 @@ fileannotateparent = "#node# #tag#
" diffblock = "
#lines#
" +changelogtag = "tag: #tag#" +changesettag = "tag: #tag#" diff --git a/templates/searchentry.tmpl b/templates/searchentry.tmpl --- a/templates/searchentry.tmpl +++ b/templates/searchentry.tmpl @@ -8,6 +8,7 @@ #node|short# #parent1# #parent2# +#changelogtag# author:  #author|obfuscate#