Categories
josephscott

SVN-Notify, Linking To Trac Revisions

Matt made it so that the revision number shown in SVN-Notify links to the Trac diff page for that revision. This was for the wp-svn list, but no reason it couldn’t be used elsewhere.

Figured I might need something like this one day, so here it is:

/usr/local/bin/svnnotify -r $REV -C -d -H HTML::ColorDiff -p $REPOS 
-t wp-svn@lists.automattic.com 
--from m@wordpress.org 
--reply-to wp-hackers@lists.automattic.com 
--revision-url http://trac.wordpress.org/changeset/%s 
--ticket-map '(#(d+))=http://trac.wordpress.org/ticket/%s' 
--ticket-regex '([(d+)])' 
--ticket-url http://trac.wordpress.org/changeset/%s

And here’s Matt’s email to wp-hackers that explains it a bit more.

One reply on “SVN-Notify, Linking To Trac Revisions”

Howdy,

You might want to check out SVN::Notify 2.70, released today, which has new support for content filtering, and includes a Trac filter that parses log messages from the Trac wiki format to HTML, thus getting all the links and other formatting. Be sure to also install Text::Trac and then use it like this:

/usr/local/bin/svnnotify -r $REV -C -d -H HTML::ColorDiff -p $REPOS
-t wp-svn@lists.automattic.com
–from m@wordpress.org
–reply-to wp-hackers@lists.automattic.com
–revision-url http://trac.wordpress.org/changeset/%s
–filter Trac
–trac-url http://trac.wordpress.org/

—Theory

Leave a Reply

Your email address will not be published. Required fields are marked *