changeset 18045:add2f9ddcfb5

hgweb: add branches RSS and Atom feeds There were no RSS nor Atom feeds for the branches page. Different hgweb templates linked to different feeds on their branches page (some linked to the tags feed, some to the log feed and some to the unexisting branches feed).
author Angel Ezquerra <angel.ezquerra@gmail.com>
date Tue, 04 Dec 2012 00:37:50 +0100
parents f3991bcf4f0f
children 40374059d227
files mercurial/templates/atom/branchentry.tmpl mercurial/templates/atom/branches.tmpl mercurial/templates/atom/map mercurial/templates/gitweb/branches.tmpl mercurial/templates/monoblue/branches.tmpl mercurial/templates/paper/branches.tmpl mercurial/templates/rss/branchentry.tmpl mercurial/templates/rss/branches.tmpl mercurial/templates/rss/map
diffstat 9 files changed, 41 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/atom/branchentry.tmpl	Tue Dec 04 00:37:50 2012 +0100
@@ -0,0 +1,8 @@
+ <entry>
+  <title>{branch|escape}</title>
+  <link rel="alternate" href="{urlbase}{url}rev/{node|short}"/>
+  <id>{urlbase}{url}#branch-{node}</id>
+  <updated>{date|rfc3339date}</updated>
+  <published>{date|rfc3339date}</published>
+  <content type="text"><![CDATA[{branch|strip|escape|addbreaks}]]></content>
+ </entry>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/atom/branches.tmpl	Tue Dec 04 00:37:50 2012 +0100
@@ -0,0 +1,11 @@
+{header}
+ <id>{urlbase}{url}</id>
+ <link rel="self" href="{urlbase}{url}atom-tags"/>
+ <link rel="alternate" href="{urlbase}{url}tags"/>
+ <title>{repo|escape}: branches</title>
+ <summary>{repo|escape} branch history</summary>
+ <author><name>Mercurial SCM</name></author>
+ {latestentry%feedupdated}
+
+ {entries%branchentry}
+</feed>
--- a/mercurial/templates/atom/map	Fri Dec 07 12:03:37 2012 -0600
+++ b/mercurial/templates/atom/map	Tue Dec 04 00:37:50 2012 +0100
@@ -10,4 +10,6 @@
 tagentry = tagentry.tmpl
 bookmarks = bookmarks.tmpl
 bookmarkentry = bookmarkentry.tmpl
+branches = branches.tmpl
+branchentry = branchentry.tmpl
 error = error.tmpl
--- a/mercurial/templates/gitweb/branches.tmpl	Fri Dec 07 12:03:37 2012 -0600
+++ b/mercurial/templates/gitweb/branches.tmpl	Tue Dec 04 00:37:50 2012 +0100
@@ -1,9 +1,9 @@
 {header}
 <title>{repo|escape}: Branches</title>
 <link rel="alternate" type="application/atom+xml"
-   href="{url}atom-tags" title="Atom feed for {repo|escape}"/>
+   href="{url}atom-branches" title="Atom feed for {repo|escape}"/>
 <link rel="alternate" type="application/rss+xml"
-   href="{url}rss-tags" title="RSS feed for {repo|escape}"/>
+   href="{url}rss-branches" title="RSS feed for {repo|escape}"/>
 </head>
 <body>
 
--- a/mercurial/templates/monoblue/branches.tmpl	Fri Dec 07 12:03:37 2012 -0600
+++ b/mercurial/templates/monoblue/branches.tmpl	Tue Dec 04 00:37:50 2012 +0100
@@ -1,7 +1,7 @@
 {header}
     <title>{repo|escape}: Branches</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-branches" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-branches" title="RSS feed for {repo|escape}"/>
 </head>
 
 <body>
--- a/mercurial/templates/paper/branches.tmpl	Fri Dec 07 12:03:37 2012 -0600
+++ b/mercurial/templates/paper/branches.tmpl	Tue Dec 04 00:37:50 2012 +0100
@@ -1,9 +1,9 @@
 {header}
 <title>{repo|escape}: branches</title>
 <link rel="alternate" type="application/atom+xml"
-   href="{url}atom-tags" title="Atom feed for {repo|escape}: branches" />
+   href="{url}atom-branches" title="Atom feed for {repo|escape}: branches" />
 <link rel="alternate" type="application/rss+xml"
-   href="{url}rss-tags" title="RSS feed for {repo|escape}: branches" />
+   href="{url}rss-branches" title="RSS feed for {repo|escape}: branches" />
 </head>
 <body>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/rss/branchentry.tmpl	Tue Dec 04 00:37:50 2012 +0100
@@ -0,0 +1,6 @@
+<item>
+    <title>{branch|escape}</title>
+    <link>{urlbase}{url}rev/{node|short}</link>
+    <description><![CDATA[{branch|strip|escape|addbreaks}]]></description>
+    <pubDate>{date|rfc822date}</pubDate>
+</item>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/rss/branches.tmpl	Tue Dec 04 00:37:50 2012 +0100
@@ -0,0 +1,6 @@
+{header}
+    <title>{repo|escape}: branches</title>
+    <description>{repo|escape} branch history</description>
+    {entries%branchentry}
+  </channel>
+</rss>
--- a/mercurial/templates/rss/map	Fri Dec 07 12:03:37 2012 -0600
+++ b/mercurial/templates/rss/map	Tue Dec 04 00:37:50 2012 +0100
@@ -9,4 +9,6 @@
 tagentry = tagentry.tmpl
 bookmarks = bookmarks.tmpl
 bookmarkentry = bookmarkentry.tmpl
+branches = branches.tmpl
+branchentry = branchentry.tmpl
 error = error.tmpl