Submitter | Angel Ezquerra |
---|---|
Date | Dec. 5, 2012, 5:02 p.m. |
Message ID | <e5883c33d457620fafb0.1354726965@Lucia-PC> |
Download | mbox | patch |
Permalink | /patch/24/ |
State | Accepted |
Commit | add2f9ddcfb5e7b462a562b98453f3ffbeefd149 |
Headers | show |
Comments
On Wed, Dec 5, 2012 at 6:02 PM, Angel Ezquerra <angel.ezquerra at gmail.com> wrote: > # HG changeset patch > # User Angel Ezquerra <angel.ezquerra at gmail.com> > # Date 1354577870 -3600 > # Node ID e5883c33d457620fafb0a558f3a62b851de44fd4 > # Parent 9b05b31b413c55d750ca8be41330ff65fa9ed8c1 > 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). > This hopefully final version adds a "{latestentry%feedupdated}" line to the new branches template, and removes the part of the commit message that explained that it did not work, since Matt has found the reason for the problem. Cheers, Angel
On Wed, Dec 5, 2012 at 6:04 PM, Angel Ezquerra <angel.ezquerra at gmail.com> wrote: > On Wed, Dec 5, 2012 at 6:02 PM, Angel Ezquerra <angel.ezquerra at gmail.com> wrote: >> # HG changeset patch >> # User Angel Ezquerra <angel.ezquerra at gmail.com> >> # Date 1354577870 -3600 >> # Node ID e5883c33d457620fafb0a558f3a62b851de44fd4 >> # Parent 9b05b31b413c55d750ca8be41330ff65fa9ed8c1 >> 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). >> > > This hopefully final version adds a "{latestentry%feedupdated}" line > to the new branches template, and removes the part of the commit > message that explained that it did not work, since Matt has found the > reason for the problem. > > Cheers, > > Angel I just checked and I can confirm that Matt's recent fixes to hgweb make this latest version of the new branch atom template work fine. Cheers, Angel
On Wed, 2012-12-05 at 18:02 +0100, Angel Ezquerra wrote: > # HG changeset patch > # User Angel Ezquerra <angel.ezquerra at gmail.com> > # Date 1354577870 -3600 > # Node ID e5883c33d457620fafb0a558f3a62b851de44fd4 > # Parent 9b05b31b413c55d750ca8be41330ff65fa9ed8c1 > hgweb: add branches RSS and Atom feeds Queued for default, thanks.
Patch
diff --git a/mercurial/templates/atom/branchentry.tmpl b/mercurial/templates/atom/branchentry.tmpl new file mode 100644 --- /dev/null +++ b/mercurial/templates/atom/branchentry.tmpl @@ -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> diff --git a/mercurial/templates/atom/branches.tmpl b/mercurial/templates/atom/branches.tmpl new file mode 100644 --- /dev/null +++ b/mercurial/templates/atom/branches.tmpl @@ -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> diff --git a/mercurial/templates/atom/map b/mercurial/templates/atom/map --- a/mercurial/templates/atom/map +++ b/mercurial/templates/atom/map @@ -10,4 +10,6 @@ tagentry = tagentry.tmpl bookmarks = bookmarks.tmpl bookmarkentry = bookmarkentry.tmpl +branches = branches.tmpl +branchentry = branchentry.tmpl error = error.tmpl diff --git a/mercurial/templates/gitweb/branches.tmpl b/mercurial/templates/gitweb/branches.tmpl --- a/mercurial/templates/gitweb/branches.tmpl +++ b/mercurial/templates/gitweb/branches.tmpl @@ -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> diff --git a/mercurial/templates/monoblue/branches.tmpl b/mercurial/templates/monoblue/branches.tmpl --- a/mercurial/templates/monoblue/branches.tmpl +++ b/mercurial/templates/monoblue/branches.tmpl @@ -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> diff --git a/mercurial/templates/paper/branches.tmpl b/mercurial/templates/paper/branches.tmpl --- a/mercurial/templates/paper/branches.tmpl +++ b/mercurial/templates/paper/branches.tmpl @@ -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> diff --git a/mercurial/templates/rss/branchentry.tmpl b/mercurial/templates/rss/branchentry.tmpl new file mode 100644 --- /dev/null +++ b/mercurial/templates/rss/branchentry.tmpl @@ -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> diff --git a/mercurial/templates/rss/branches.tmpl b/mercurial/templates/rss/branches.tmpl new file mode 100644 --- /dev/null +++ b/mercurial/templates/rss/branches.tmpl @@ -0,0 +1,6 @@ +{header} + <title>{repo|escape}: branches</title> + <description>{repo|escape} branch history</description> + {entries%branchentry} + </channel> +</rss> diff --git a/mercurial/templates/rss/map b/mercurial/templates/rss/map --- a/mercurial/templates/rss/map +++ b/mercurial/templates/rss/map @@ -9,4 +9,6 @@ tagentry = tagentry.tmpl bookmarks = bookmarks.tmpl bookmarkentry = bookmarkentry.tmpl +branches = branches.tmpl +branchentry = branchentry.tmpl error = error.tmpl