This assumes you already have an SVN repository setup.
First download perl pre-requisites:
yum install perl-CPAN perl -MCPAN -e 'install SVN::Notify' perl -MCPAN -e 'install SVN::Notify::HTML::ColorDiff'
or
yum install perl perl -MCPAN -e 'install SVN::Notify' perl -MCPAN -e 'install SVN::Notify::HTML::ColorDiff'
Next download SVN Notify from CPAN:
cd /home wget http://search.cpan.org/CPAN/authors/id/D/DW/DWHEELER/SVN-Notify-2.83.tar.gz tar zxf SVN-Notify-2.83.tar.gz cd SVN-Notify-2.83/
Next run MAKE:
perl Build.PL ./Build ./Build test ./Build install
If that doesn’t work then try:
perl Makefile.PL make make test make install
Now change to your SVN directory and then to the hooks directory:
cd /%SVN LOCATION HERE%/hooks/
Create a post-commit file using vim:
vim post-commit
Add this to the file (replace: to-mail@domain.com/from-mail@domain.com/reply-mail@domain.com
#!/bin/sh REPOS="$1" REV="$2" /usr/local/bin/svnnotify -r $REV -C -d -H HTML::ColorDiff \ -p $REPOS -t to-mail@domain.com --from from-mail@domain.com \ --reply-to reply-mail@domain.com
Save the script and give it execution permission:
chmod +x post-commit
Now every time someone commits to the SVN repository, an email notification will be sent.
After many tries to install SVN notify with your post, I gave up…
Always failed with final message :
Couldn’t install Module::Build, giving up
I finally found a better and quicker solution here :
http://pkgs.org/centos-6-rhel-6/repoforge-i386/perl-SVN-Notify-2.80-1.el6.rf.noarch.rpm.html
yum install perl-Module-Build
such great tutorial i done it thanks for this share please give more impotant other for svn auto update when commit on server using svn hook….