Although this question is a bit old, just thought I would leave my opinion for those coming here from Google:
I've considered the solutions mentioned here. The commit-email.pl
was both easier and better working for me. However, I find both solutions lacking proper formatting.
Thus, the svnnotify
package seems to produce well-enough formatted and colored emails for me.
On Debian/Ubuntu systems you can install it by typing:
apt-get install libsvn-notify-perl
Then, if you are gonna send emails to Gmail accounts, due to odd CSS support in Gmail, I would strongly recommend applying the patch found here, which means:
- Download
HTML.pm
and ColorDiff.pm
- Replace with them
/usr/share/perl5/SVN/Notify/HTML.pm
and /usr/share/perl5/SVN/Notify/HTML/ColorDiff.pm
, respectively.
And finally, setup the post-commit
hook script the usual way:
# email notifications for commits
/usr/bin/svnnotify --repos-path "$REPOS" --revision "$REV" \
--to [email protected] \
--from [email protected] \
--with-diff \
--subject-cx \
--subject-prefix 'Your Project Name: ' \
--handler HTML::ColorDiff \
--css-inline
2>&1 &
exit 0