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

Re: Hook scripts

From: John Szakmeister <john_at_szakmeister.net>
Date: 2005-05-28 11:11:23 CEST

On Friday 27 May 2005 20:40, Kyle Heon wrote:
> Thanks for the information.
>
> I'm just playing around with a simple hook script but it doesn't appear
> to be running when I do a commit. The file is named post-commit.rb.
>
> The commit works and all but the expected output (a log file, for
> starters) is not being created.
>
> Is there anywhere that Subversion logs errors generated during the
> execution of a hook script?

If you're using http:// access, something might be recorded in the apache
error log.

A couple of things to keep in mind when writing your post-commit hook
script. First, the directory that the hook script is executed from is
not necessarily the same directory that the script is located in. IOW,
if you need to output something to a particular directory, then either
put in an absolute path, or make sure to change to the appropriate
directory before generating your output. Secondly, the script is
executed in an empty environment. If your script counts on touching
other tools, then you may need to set all the appropriate environment
variables for it to work correctly. Finally, don't forget that the hook
script is run as the same user as the server process. So be sure
whatever your touching has the permissions set to allow for the desired
access.

HTH.

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat May 28 11:13:20 2005

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