Quantcast
Channel: Mayflower Blog » administration
Viewing all articles
Browse latest Browse all 2

Using CVSSpam with Subversion

$
0
0

When switching from one application to another, like migrating from CVS to SVN, users tend to take the switch more lightly if they find the new application looking familiar.I recently had the task to set up an SVN environment for one of our projects and among the requirements was “SVNSpam”.
The standard SVN mail notification mechanism just sends plain computer-readable diffs in ascii, no fancy HTML diffs with color-markup.
After some searching, I found that apparently the tool regarded as SVNSpam is really CVSSpam with some new scripts. Alas, the documentation of CVSSpam does not mention SVN at all. After mailing the author, he told me that the SVN scripts are unmaintained user contributions of unknown status.

A little digging into ruby code and comparing the scripts and paths with the default SVN mailing facility brought up the solution:

copy all .rb and .sh files from cvsspam to /srv/svn/{project}/hooks and create an executable shellscript there named “post-commit”:

#!/bin/sh
/srv/svn/{project}/hooks/svn_post_commit_hook.sh –to receipient@example.com –from sender@example.com $*

For cosmetic purposes I then edited cvsspam.rb to prepend “[SVN Projectname]” instead of “[CVS Projectname]”. Now SVN sends the familiar fancy-colored diffs after a commit. The CVSSpam author said that an SVN move command is shown as copy & delete, but that does not really matter for now.

The boss is happy and the coworkers have their familiar view :-)

Weitere Artikel wie Using CVSSpam with Subversion finden Sie unter Mayflower Blog.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images