Can I include diff in the hgweb RSS feed?

RSS feeds are a very good way to inform people about the latest changes in repo. Unfortunately, RSS feeds only include a post message in the body by default.

This similar question contains information on how to configure the feed, but unfortunately there is no mention of adding diff. Is it possible? How can i do this?

+4
source share
1 answer

As it turned out, not only {diff} not passed to changelogentry.tmpl for RSS, but the RSS template itself does not contain some of the templates needed to display diff.

I made a quick and dirty patch by adding raw diff to the Mercurial RSS template set. The patch is based on version 2.2.1 of Mercurial. It modifies the Mercurial source ( webcommands.py ) in addition to the set of RSS templates, so you end up using a fixed version of Mercurial itself, not just the templates.

The patch can be found on so-10796514 branch in my copy of the Hg repo on Bitbucket. Feel free to use it.

Here's what the modified change log looks like on my machine:

Screenshot of the RSS changelog with diffs, in Safari

I think this can be improved from this point of view.

+2
source

Source: https://habr.com/ru/post/1414851/


All Articles