Sunday, 4 October 2009

SVN Notify by Email

Svn hook to email you information in post commit hook.

Install svnnotify which will be used to send the email

yum install perl-CPAN
perl -MCPAN -e 'install SVN::Notify'
perl -MCPAN -e 'install SVN::Notify::HTML::ColorDiff'


The post-commit script


#!/bin/sh
for i in 'email1@domain.co.uk' 'email2@domain.com'
do
svnnotify --repos-path "$1" \
--revision "$2" \
--to $i \
--from account@example.co.uk \
--handler HTML::ColorDiff -d \
done