Hari Kodungallur wrote:
>
> On 6/7/07, *Steve Finkelstein* <sf@stevefink.net
> <mailto: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
> <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 <mailto: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).
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.
rick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jun 8 19:38:55 2007