How do I make Subversion (SVN) send email on checkins?

I've always found checkin (commit) mails to be very useful for keeping track of what work other people are doing in the codebase / repository. How do I set up SVN to email a distribution list on each commit?

I'm running clients on Windows and the Apache Subversion server on Linux. The answers below for various platforms will likely be useful to other people though.


Solution 1:

You use the post-commit hooks. Here's a guide.

Here's a sample Ruby script that sends an email after each commit: commit-email.rb

Solution 2:

Have a look at the standalone Subversion Notify tool (Windows only!) It can do emailing on commit and also much more!

Solution 3:

You'll want to familiarize yourself with repository hooks, particularly the post-commit hook.

Solution 4:

VisualSVN Server has useful commit e-mail notification hook VisualSVNServerHooks.exe. It supports colored diffs and can send commit notifications only when commit affects certain repository path.

See "Configuring Email Notifications in VisualSVN Server".