Mercurial > hg
changeset 1769:982fb022a16a
Merged RSS feed for tags from Peter van Dijk
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 21 Feb 2006 16:04:47 +0100 |
parents | b9fac31f34c9 (current diff) f79afc26ae3b (diff) |
children | 0762feff3043 b9671b41e360 |
files | mercurial/hgweb.py |
diffstat | 5 files changed, 21 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb.py Tue Feb 21 15:54:50 2006 +0100 +++ b/mercurial/hgweb.py Tue Feb 21 16:04:47 2006 +0100 @@ -660,9 +660,10 @@ i = self.repo.tagslist() i.reverse() - def entries(**map): + def entries(notip=False, **map): parity = 0 for k,n in i: + if notip and k == "tip": continue yield {"parity": parity, "tag": k, "tagmanifest": hex(cl.read(n)[0]), @@ -672,7 +673,8 @@ yield self.t("tags", manifest=hex(mf), - entries=entries) + entries=lambda **x: entries(False, **x), + entriesnotip=lambda **x: entries(True, **x)) def summary(self): cl = self.repo.changelog
--- a/templates/map-rss Tue Feb 21 15:54:50 2006 +0100 +++ b/templates/map-rss Tue Feb 21 16:04:47 2006 +0100 @@ -4,3 +4,5 @@ changelogentry = changelogentry-rss.tmpl filelog = filelog-rss.tmpl filelogentry = filelogentry-rss.tmpl +tags = tags-rss.tmpl +tagentry = tagentry-rss.tmpl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/tagentry-rss.tmpl Tue Feb 21 16:04:47 2006 +0100 @@ -0,0 +1,6 @@ +<item> + <title>#tag|escape#</title> + <link>#url#?cs=#node|short#</link> + <description><![CDATA[#tag|strip|escape|addbreaks#]]></description> + <pubDate>#date|rfc822date#</pubDate> +</item>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/tags-rss.tmpl Tue Feb 21 16:04:47 2006 +0100 @@ -0,0 +1,6 @@ +#header# + <title>#repo|escape#: tags </title> + <description>#repo|escape# tag history</description> + #entriesnotip%tagentry# + </channel> +</rss>
--- a/templates/tags.tmpl Tue Feb 21 15:54:50 2006 +0100 +++ b/templates/tags.tmpl Tue Feb 21 16:04:47 2006 +0100 @@ -1,11 +1,14 @@ #header# <title>#repo|escape#: tags</title> +<link rel="alternate" type="application/rss+xml" + href="?cmd=tags;style=rss" title="RSS feed for #repo|escape#: tags"> </head> <body> <div class="buttons"> <a href="?cl=tip">changelog</a> <a href="?mf=#manifest|short#;path=/">manifest</a> +<a type="application/rss+xml" href="?cmd=tags;style=rss">rss</a> </div> <h2>tags:</h2>