Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Do you have any recommendations for a relatively turn-key SVN checkin notification system?

I'm looking for something that allows a summary of repository files changed and the contents of the actual diffs to be sent to all members of a development team by email when commits occur, perhaps with links to the full affected source file at ViewVC or something. That's optional.

I definitely want the actual diff/code excerpts to be neatly compartmentalised. Nobody is going to look at these things (as if they will anyway :-) if it's just a big, reckless dump of incomprehensible code fragments right from the beginning. In principle, I just want to see the revision number, summary, user who made the commit, and a list of affected repository files.

I spent a little bit of time looking at the feasibility of writing my own, and while I see that SVN has "hooks" for catching various events in precisely this manner, getting something polished that works well does seem to be a rather involved task. Being fairly certain that open-source packages to this effect exist out there, I was wondering if any of you could help save me the trouble of figuring out which ones are good and which ones are bad. I'm looking for something fairly easy to set up and not requiring a great deal of time; I'd love to spend the time learning the ins and outs of a really comprehensive system, but I have to actually do the development, too.

Thank you all very much in advance!

EDIT: I know Sourceforge does this fairly well. I'm on several -dev lists where I constantly get these messages. But I can't really use Sourceforge for the sorts of projects I'm working on.

share|improve this question
    
A hint for everyone who wants to setup a hook like this: This could be a injury of information privacy laws (BDSG in Germany). Be carefull to use this! –  please delete me Aug 18 '09 at 11:38

5 Answers 5

up vote 8 down vote accepted

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).

share|improve this answer
    
For future reference: on other systems which don't determine file type by extension (well, definitely at least Linux), the hook is just named post-commit. Just remove the .bat extension from the Windows version of the name. –  David Z Jul 26 '09 at 7:15
    
David, thanks for your comments. I've adjusted the answer accordingly. –  Pauk Jul 26 '09 at 7:53
    
Thanks Pauk - this did it! –  Alex Balashov Jul 31 '09 at 23:44

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.

share|improve this answer

svnmailer is another option.

share|improve this answer

SVN monitor is probably what you want.

share|improve this answer
    
I run Linux, so a standalone Windows app won't do. I appreciate the suggestion, though. –  Alex Balashov Jul 26 '09 at 22:31

You can find a few more options on the Subversion site: CommitMonitor, SVN notifier, SvnReporter (shameless plug).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.