The SVN commit emails that I blogged about previously don't quite match the expectations I had, given the rich emails that CVSspam produces.
The commit-email.pl script can certainly be hacked to your own preference but an alternative is to use SVN-Notify - a Perl module that is capable of producing much richer emails.
If you don't have it installed (as I didn't), then it can be as simple as typing:
perl -MCPAN -e 'install SVN::Notify'
See http://www.cpan.org/misc/cpan-faq.html#How_install_Perl_modules for more details.
Check that it works by typing "svnnotify" at the terminal. You should be prompted for more arguments:
Missing required "--repos-path" parameter
With that installed, the next step is to replace the existing call to commit-email.pl with a call to svnnotify:
svnnotify --repos-path "$1" --revision "$2" --to myemail@example.org --from anotheremail@example.org
The arguments are fairly self explanatory. You just need to replace the values for the --to and --from arguments. A whole host of further argument options are detailed in the documentation. You may, for example, wish to use a particular smtp server rather than relying on sendmail being installed and accessible on the SVN server.
Or if like me, you like to see who committed the fix by the email address it came from, you can replace the --from argument with the --user-domain argument. The email notifications will subsequently come from the given user that committed the fix @ the given domain (e.g. andy@example.org).
svnnotify --repos-path "$1" --revision "$2" --to myemail@example.org --user-domain example.org
The emails you receive with the previous command are fairly similar to the ones received via the commit-email.pl. In order to receive colorized html emails complete with diffs you need to add a couple of arguments:
svnnotify --repos-path "$1" --revision "$2" --to myemail@example.org --from anotheremail@example.org --handler HTML:ColorDiff -d
There are further options when you use this email as detailed in the SVN::Notify::HTML and SVN:Notify::HTML::ColorDiff documentation. For example, you can provide a css url if the default styling of the email isn't to your liking.