views:

285

answers:

5

Where can I find good templates for svn commit emails?

Google led me to this. Even though it was much better than the default post-commit, I didn’t find it very useful.

Help much appreciated.

A: 

I'm using this: commit-email.pl

and post commit hook:

REPOS="$1"
REV="$2"
MAILNAME=`cat /etc/mailname`
REPONAME=$(basename $REPOS)

/var/local/lib/svn/commit-email.pl "$REPOS" "$REV" -s "[$REPONAME]" -h $MAILNAME --from "SVN" [email protected]
Piotr Pankowski
which is the default one i pointed to, thats not at all pretty
Quintin Par
A: 

You can get the commit data from 'svn log --xml -v -r $REV' and filter the output through a xslt processor. There are some procjects which uses this workflow, like an RSS Generator or a changelog generator.

Rudi
A: 

I find this one pretty useful because it includes a diff.

Travis Beale
+1  A: 

I have found a combination of SVNSpam and the native python scripts to work very well. SVNSpam sends a html email with colored diffs which are really easy to read.

There is a bug in SVNSpam that wont allow it to handle binary files. So, in the post-commit hook I set up the usual python mailer script that comes with SVN Hooks package. I have it so that if SVNSpam returns an error code (and it only does so for binary diffs and tagging), the python mailer script is called. This handles everything very well for us.

omermuhammed
A: 

Good template would include a link to a review board (chatroom about the revision) and the case id. It also needs to have every changed file as a link to some websvn diff.

Pavel Radzivilovsky