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

Re: post-commit hook not firing over svn+ssh (Subclipse)

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-05-02 00:16:55 CEST

Please send replies to the list too, so everyone can benefit from the
discussion.

On May 2, 2006, at 00:08, Bradley Wagner wrote:

>> The standard advice is to make sure that all paths in the script
>> are absolute, and to insert "echo" statements at strategic points
>> in the script which send output to a logfile which you can check
>> to see if the script is reaching a particular line.
>>
>> If you can send us your hook script, maybe we can see the problem...
>
> Here's my post-commit script:

[snip]

> REPOS="$1"
> REV="$2"
>
> ./commit-email.pl "$REPOS" "$REV" bradley.wagner@hannonhill.com
> # log-commit.py --repository "$REPOS" --revision "$REV"
>
> and the commit-email lives in the same directory and is just the
> out of the box commit-email.pl script with execute privileges for
> everyone.

Yes, you'll have to specify the absolute path to that. Hook scripts
run without an incredibly minimal environment, including without a
current working directory (on Unix-like systems; on Windows systems,
I'm told, the current working directory is set, though it's not the
one that might be expected, so using absolute paths is still
recommended).

/complete/path/to/commit-email.pl "$REPOS" "$REV" email@addy

> Can I just pipe "echo" to a file: "echo 'here' > log.debug"?

Right, except again you'll have to specify the full path to the file.

echo before sending mail > /complete/path/to/log.debug

I believe /bin is in the PATH when the hook runs, so it's not
necessary to call "echo" as "/bin/echo", though, of course, if it
fails, try calling it as /bin/echo instead.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue May 2 00:18: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.