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

Re: email automatic at commit

From: Patrick Dean Rusk <PRusk_at_foliage.com>
Date: 2004-08-21 00:01:56 CEST

"Patrick Dean Rusk" <PRusk@foliage.com> wrote...
> > You want to use the post-commit hook to send a commit email, see
> >
> > http://svnbook.red-bean.com/svnbook/ch05s02.html#svn-ch-5-sect-2.1
>
> Has anyone set that Perl script up to work properly with a repository
> running on Windows? If so, I could use some pointers, because I haven't
used
> Perl in years, and never under Windows.
>
> Just a thought... I am best off installing Cygwin on that box and
using
> that to deal with the script?

    Thought I would pass on my limited success in doing this....

    I did install Cygwin on the server, including the ssmtp package. I also
installed the Subversion supplied with Cygwin, but backed that out after
problems.

    Now, what I have is this. First, a "post-commit.bat" looking like this
(with some potentially sensitive information removed):
----- cut -----
@echo off
C:
cd <repos-path>\hooks
C:\cygwin\bin\bash post-commit.sh %1 %2 commit-watchers@foo.com
----- cut -----

    The "post-commit.sh" in the hooks directory looks like this:
----- cut -----
#!/usr/bin/bash

PATH=/usr/local/bin:/usr/bin:/bin

REPOS="$1"
REV="$2"
EMAIL="$3"

/cygdrive/c/<repos_path>/hooks/commit-email.pl "$REPOS" "$REV" -h foo.com -s
"[svn:projname] " "$EMAIL"

----- cut -----

    Finally, the "commit-email.pl" comes directly from
http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/commit-email.pl.in
    with the svnlook path line looking like this:
my $svnlook = "/cygdrive/c/<subversion_root>/bin/svnlook";

    You also need to put an appropriate "ssmtp.conf" file in
<cygwin_root>/etc/ssmtp
    by modifying the template found in
<cygwin_root>/usr/share/doc/ssmtp-2.60.9/ssmtp.conf

    Not clean, by any means, but it now works in a Windows environment.

Patrick Rusk

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Aug 21 00:02:32 2004

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