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

Re: Can't get commit-email to work automatically

From: <j.trauntvein_at_comcast.net>
Date: 2006-11-13 21:29:33 CET

 -------------- Original message ----------------------
From: Ryan Schmidt <subversion-2006d@ryandesign.com>
> On Nov 13, 2006, at 08:36, Jon Trauntvein wrote:
>
> > I am maintaining a subversion server on a Fedora core 4 machine
> > (subversion 1.2.3) and use access the server using the svnserve --inet
> > protocol. I have been attempting in vain to make make the post-commit
> > hook invoke the commit-email.pl program that I found in
> > /usr/share/doc/subversion-1.2.3/tools/hook-scripts but see no results
> > when commits are made. I can however make the script work if invoked
> > by hand as in the following:
> >
> > env - ./post-commit /home/group/svn 936
> >
> > In this case, the expected email appears. Does anyone have any clue
> > what I am doing wrong?
>
> Could be several things.
>
> Is the hook script itself being executed? Is its executable bit set
> and named correctly? If you write to a log file from within the hook
> script (specifying the absolute path to the log file), does the log
> file get written to?
>
> Are you specifying the absolute path to the commit-email.pl script?
> Relative paths do not work in hook scripts (on non-Windows systems)
> because the PATH variable is empty when the hooks run.

I just placed an echo command that copies the script parameters to a log file and verified that the log file
is being changed with each commit. This verifies that the hook is being executed.

I copied the commit-email.pl script into the hooks directory (the same directory as the hook scripts). My
hook script is invoking this as ./commit-email.pl Further, the email gets sent properly if I invoke the hook
script within the env - command which also clears out all environment variables including path.

Regards,

Jon Trauntvein

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Nov 13 21:30:23 2006

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.