Posts Tagged ‘Add email commit notification to Subversion (SVN) / Setting up Subversion email notification with custom Subject’

Add email commit notification to Subversion (SVN) / Setting up Subversion email notification with custom Subject

Sunday, April 18th, 2010

Reading Time: < 1minute
Ever wondered how to set up email notification with specific subject for a Subversion Project? I bet you did.
I was demanded today to conduct that in order to achieve it, here is what I did on a Debian Lenny server.

1. Copy your post-commit.tmpl to post-commit

cp -rpf /var/svn-repos/your_repository/hooks/post-commit.tmpl /var/svn-repos/your_repository/hooks/post-commit;

2. Open post-commit and put in it:

/usr/share/subversion/hook-scripts/commit-email.pl -s "TEST" $REPOS $REV email_name@email.com email_nam1@email.com

The “-s” specifies the subject you’d like to have to your e-mail notification.
That’s it if you have properly configured mail server at localhost. Then your email notification following each of thecommits revisions should start poping up to your email.