[PATCH] Add tags to hgweb
authormpm@selenic.com
Fri, 01 Jul 2005 14:46:31 -0800
changeset 568 e8fd41110dce
parent 567 87f37e61d0db
child 569 3e347929f5f9
[PATCH] Add tags to hgweb -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH] Add tags to hgweb From: Goffredo Baroncelli <kreijack@libero.it> manifest hash: 3a59c363799c974b042dbb55f943d830feb1b34f -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCxcfHywK+sNU5EO8RAgEKAJ40SRMOyBOkbS8QU2MIBUzBnhu5AwCbBDjR M+gaWyqzqOBzO1r+9zpb37k= =l1pL -----END PGP SIGNATURE-----
mercurial/hgweb.py
templates/changelogentry.tmpl
templates/changeset.tmpl
templates/map
templates/searchentry.tmpl
--- a/mercurial/hgweb.py	Fri Jul 01 14:43:36 2005 -0800
+++ b/mercurial/hgweb.py	Fri Jul 01 14:46:31 2005 -0800
@@ -155,6 +155,10 @@
         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 @@
                                           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 @@
                                           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 @@
                                            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]),
--- a/templates/changelogentry.tmpl	Fri Jul 01 14:43:36 2005 -0800
+++ b/templates/changelogentry.tmpl	Fri Jul 01 14:46:31 2005 -0800
@@ -8,6 +8,7 @@
  <td><a href="?cmd=changeset;node=#node#">#node|short#</a></td></tr>
 #parent1#
 #parent2#
+#changelogtag#
 <tr>
  <td align="right">author:&nbsp;</td>
  <td>#author|obfuscate#</td></tr>
--- a/templates/changeset.tmpl	Fri Jul 01 14:43:36 2005 -0800
+++ b/templates/changeset.tmpl	Fri Jul 01 14:46:31 2005 -0800
@@ -18,6 +18,7 @@
  <td><a href="?cmd=changeset;node=#node#">#node|short#</a></td></tr>
 #parent1#
 #parent2#
+#changesettag#
 <tr>
  <td class="metatag">manifest:</td>
  <td><a href="?cmd=manifest;manifest=#manifest#;path=/">#manifest|short#</a></td></tr>
--- a/templates/map	Fri Jul 01 14:43:36 2005 -0800
+++ b/templates/map	Fri Jul 01 14:46:31 2005 -0800
@@ -30,3 +30,5 @@
 tags = tags.tmpl
 tagentry = "<div class="parity#parity#"><tt>#node#</tt> <a href="?cmd=changeset;node=#node#">#tag#</a><br /></div>"
 diffblock = "<div class="parity#parity#">#lines#</div>"
+changelogtag = "<tr><td align="right">tag:&nbsp;</td><td>#tag#</td></tr>"
+changesettag = "<tr><td class="metatag">tag:&nbsp;</td><td>#tag#</td></tr>"
--- a/templates/searchentry.tmpl	Fri Jul 01 14:43:36 2005 -0800
+++ b/templates/searchentry.tmpl	Fri Jul 01 14:46:31 2005 -0800
@@ -8,6 +8,7 @@
  <td><a href="?cmd=changeset;node=#node#">#node|short#</a></td></tr>
 #parent1#
 #parent2#
+#changelogtag#
 <tr>
  <td align="right">author:&nbsp;</td>
  <td>#author|obfuscate#</td></tr>