E-mail notifications of SVN commits [closed]

Your mention of hooks is actually not far off the answer. You can use the post commit hook to run commit_email.pl (contents of), which is bundled with Subversion, that will give you pretty much what you're after. It'll need tweaking to point to your mail server but that's just a variable near the top of the script. You'll also need Perl installed to run the script.

The post commit hook differs in file name depending on the OS you're running on. You'll find it in the /hooks/ subfolder. For Linux its simply post-commit whilst on Windows its post-commit.bat. All you would need to do is modify that file to run commit_email.pl. Below is an example post-commit.bat:

@echo on
rem POST-COMMIT HOOK

set REPOS=%1
set REV=%2

C:\Perl64\bin\perl S:\SVNRepos\hooks\commit-email.pl %REPOS% %REV% -l C:\Temp\svnlook\commit-email.log

Also, I made further change to our email script to show the email address of who the commit was from, instead of the Subversion user name. It makes the email sent a bit more useful (you can actually reply to it).


I use SVN-Notify, which is a perl script and should run on Windows, although I haven't tried it. It uses HTML::ColorDiff to provide nice coloured diffs post-commit.

This was recommended to me by a dev colleague, and it's great.


svnmailer is another option.