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

Re: No hooks triggered!

From: Ryan Schmidt <subversion-2006c_at_ryandesign.com>
Date: 2006-08-24 09:35:05 CEST

On Aug 24, 2006, at 09:02, Stromek wrote:

> On Wed, Aug 23, 2006 at 07:33:25PM +0200, Ryan Schmidt wrote:
>
>> It probably is triggered, you just haven't told it where to put the
>> file. Use only absolute paths in hook scripts, or else set $PATH at
>> the beginning to what you want it to be.
>>
>>
>> #!/bin/sh
>> /bin/echo "whatever" > "/tmp/post-commit.log"
>
> strange but it works. Before, it did not create any file in any
> directory (I used find / -name "post-commit.log") to check it.
> However, post-commit is triggered and the log file is created now.

On Windows, the path is set to something weird, and so files you
create with relative paths do get created, but probably not where you
wanted them. On Unix/Linux/Mac OS X, the path is empty, so files you
try to create with relative paths do not get created anywhere. In
both cases, you should use absolute paths.

> It is strange because in the svn book it is said that scripts called
> from the particular hook should be in the repos/hooks to be called
> without
> specifying the path to them. See for example post-commit.tmpl, it
> calls:
>
> commit-email.pl "$REPOS" "$REV" example@example.org
>
> This does not work for me. If I specify full path
> (repos/hooks/commit-email.pl) it works fine. I don't know why this
> didn't
> work for me before when I used the script from default system path
> (/usr/share...) but it does not matter now.

That is correct; it cannot work if you just call the script without
specifying the path to it, unless you first define the path
correctly. The example hook script doesn't attempt to do either,
which is confusing. Perhaps the example hook script should be improved.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Aug 24 09:36:22 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.