When creating new repository a sample post-commit hook is provided in hooks/post-commit.tmpl
. It contains a line that looks more or less like this:
/usr/share/subversion/hook-scripts/commit-email.pl "$REPOS" "$REV" [email protected]
Just substitute the email with the address you want to send notifications to, rename the script to hooks/post-commit
(remove the tmpl
extension) and make it executable (chmod a+x
).
When you run the commit-email.pl
script without any arguments you will see an usage screen with extra options that allow for example to modify the subject line or the From address.
Please note that is case of Debian the commit-email.pl
script is located in an optional subversion-tools
package.