RSS page for tags (and other pages)

Matt Mackall mpm at selenic.com
Thu Nov 29 13:53:24 CST 2012


On Thu, 2012-11-29 at 17:55 +0100, Angel Ezquerra wrote:
> Hi,
> 
> today, playing around with the rss web.style I noticed that it is
> possible for hgweb to generate an RSS feed that only shows the tagged
> the revisions for example, if you select the "rss" style.
> 
> However, if you click on the RSS or Atom button that is located on the
> tags page you get an RSS feed of all the revisions, not of the tagged
> revisions as could be expected. That button links to {url}rss-log. I
> tried manually going to {url}rss-log/tags or even {url}/tags/rss-log
> but that does not work.
> 
> I looked for "rss-log" on the mercurial source code but I did not find
> any references to it except on the template files. I'd like to fix
> this issue since I think it would be nice to be able to "subscribe" to
> a tag page and get notifications whenever someone adds a new tag, for
> example. You could even suscribe to a file and be notified when the
> file is modified, etc, which I think would be really powerful.
> 
> Does someone have an idea of where is the "rss-log" handled?
> Alternatively, is there a way to ask the web server to serve a page as
> if the "rss" web style had been selected?

Internally, hgweb has no special support for RSS. It's simply a style.
The rss-log/ link is in the form [<style>-]<page>/.

Implementing RSS for tags is probably a matter of copying
templates/rss/log.tmpl to tags.tmpl, fixing it up, and editing the other
templates that link to it. Same for atom. Consult paper/tags.tmpl to see
what sort of data is available in the tags page context.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list