How to enable email notification of
commits(svn)
1.1. The email script
- Retrieve commit-email.pl.in from here: http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/
Or
Find / -name commit-emial.pl
/usr/share/doc/subversion-1.4.4/tools/hooks-scripts/commit-email.pl
Cp /usr/share/doc/subversion-1.4.4/tools/hooks-scripts/commit-email.pl /path/to/repos/hooks/
- Save it as 'commit-email.pl' in /path/to/repos/hooks. Make sure it's executable.
Chmod 755 commit-email.pl or chmod a+x commit-email.pl
- In commit-email.pl, you may need to hard-code the path to svnlook.
(svn path)#”/usr/bin/svnlook”
1.2. The post-commit hook
In /path/to/repos/hooks
cp post-commit.tmpl post-commit(Rename)
chmod a+x post-commit(chmod 755 post-commit)
1.3 Modify post-commit
REPOS=”$1”
REV=”$2”
/path/to/repos/hooks/commit-email.pl “$REPOS” “REV” –- from SVN@SVN.COM–s “svn commit:$REPOS” selina_chu@sdc.sercomm.com
后接多个mail地址,即可发送给多人