[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Subversion commit to Atom syndication feeds

From: Stephane Bortzmeyer <bortzmeyer_at_nic.fr>
Date: 2005-11-25 17:07:48 CET

Based on a XSLT stylesheet originally written by Norman Walsh, here is
a small contrib, a XSLT stylesheet to produce an Atom
(http://www.atomenabled.org/) news feed from Subversion commits.

The main modification from the original work is that I believe it is
now fully parametrized which means you do not have to modify the
source code to adapt it to your environment.

I run it with xsltproc and from a Makefile which looks like:

HEAD=$(shell svnversion ${ROOT} | sed 's/M$$//')
START=$(shell echo ${HEAD} - ${NUMBER} | bc)

        svn log --xml --verbose -r ${START}:HEAD ${ROOT} | \
        xsltproc --stringparam repository_name CODEV-NIC \
                --stringparam url https://svn.generic-nic.net/ \
                --stringparam tag codev-nic.generic-nic.net,2005-01-01 \
                --stringparam maintainer subversion@generic-nic.net \
                --stringparam prefix 'https://viewcvs.generic-nic.net/viewcvs.cgi/?view=rev&amp;rev=' \
                --stringparam linktofiles https://viewcvs.generic-nic.net/viewcvs.cgi \
                --stringparam endlinktofiles '?rev=REVISION_NUM&amp;view=markup' \
                svnlog2atom.xsl - > $@

.PHONY: feed.atom

Running it from a post-commit hook is left as an exercice :-)

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Received on Fri Nov 25 17:14:48 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.