Re: Hook for notify on commit?
Hari Kodungallur wrote:
> On 6/7/07, *Steve Finkelstein* <email@example.com
> <mailto:firstname.lastname@example.org>> 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
> commits done in one day. But to start, a commit per transaction e-mail
> would be excellent. Archived option would be even better.
> 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
> and in that script call
> <svn-install-dir>/tools/hook-scripts/commit-email.pl "$1" "$2"
> email@example.com <mailto:firstname.lastname@example.org>
> 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).
Just make sure you test the bejesus out of it. I just got through
dealing with an issue where I had to use sendmail rather than connect to
SMTP server in the commit-email.pl script. Using SMTP would cause the
script to fail (at least after upgrading to 1.4mumble), and a
commit-hook script failure would then lead to assertion errors in the
client, (1.4 or 1.3) leading to the client mistakenly believing that the
commit didn't complete and also leaving the working copy in a state
(even after cleaning up the locks) where no more commits (of those
files) were possible.
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Fri Jun 8 19:38:55 2007
This is an archived mail posted to the Subversion Users