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

Re: Hook for notify on commit?

From: Hari Kodungallur <hkodungallur_at_gmail.com>
Date: 2007-06-08 07:18:50 CEST

On 6/7/07, Steve Finkelstein <sf@stevefink.net> wrote:
>
> Hi all,
>
> Would anyone be able to give me insight on some documentation which
> would help me implement a hook to our webDAV based svn repository notify
> us whenever any code is committed?
>
> Eventually I'd like to do some filtering, and archived e-mailing for all
> commits done in one day. But to start, a commit per transaction e-mail
> would be excellent. Archived option would be even better.
>
> Cheers!

Subversion source code comes with a (perl) script called commit-email.pl.
This is in the tools/hook-scripts directory.

So all you have to do is to configure a post commit hook (
http://svnbook.red-bean.com/en/1.1/svn-book.html#svn-ch-5-sect-2.1) and in
that script call

<svn-install-dir>/tools/hook-scripts/commit-email.pl "$1" "$2"
myemail@mycompany.com

You would normally want to copy the script to a different location and
customize the script (may be you want to change the subject or something to
something that is more specific to what you need).

Thanks!
-Hari
Received on Fri Jun 8 07:19:17 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.