[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: post-commit question/issue

From: Andrew R Feller <afelle1_at_lsu.edu>
Date: 2007-05-02 15:05:24 CEST

Hello Binod,


What you have

* Repository whose path is /home/svn/repos

* Path to hook script is obviously


What you want post-commit.sh to do

* Kickoff anytime a developer commits to the trunk ( or main
line of development)

* Send emails to all the developers who are related to the
particular project


What you've done

* Copied post-commit.tmpl to post-commit.sh (If
/home/svn/repos/hooks/post-commit is the obvious path, why is this

* Gave REPOS=/home/svn/repos



* Have post-commit hook call an executable to send the emails
rather than the post-commit hook doing the work

* Rename post-commit.sh to post-commit; Subversion is looking
for a file called post-commit on Unix/Linux

* Make sure it is executable; chmod 755

* Change REPOS=/home/svn/repos back to REPOS="$1"

* Leave 'REV="$2"' alone; this is the revision # of the commit

* At the end of your file, put a line like the following to call
your email script:
${REPOS}/hooks/scripts/mailer.py commit "${REPOS}" "${REV}"

* Mailer.py is a Subversion contribution that you can download
here: http://subversion.tigris.org/tools_contrib.html

* Make sure Mailer.py is executable


Hope this helps,



Andrew R Feller, Analyst

University Information Systems

Louisiana State University


(office) 225.578.3737
Received on Wed May 2 15:05:52 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.