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

Re: Server Hooks not working

From: Florian Engelhardt <f.engelhardt_at_21torr.com>
Date: 2005-05-20 13:37:14 CEST

Hello,

On Fri, 20 May 2005 06:31:23 -0400
John Szakmeister <john@szakmeister.net> wrote:

> Are you sure that the pre-commit hook is executable? It didn't look
> like you had one at all in your previous email. It looks like the
> server is trying to execute the script, but is failing... either
> because of the script, or because permissions of the script. Also,
> remember that these scripts run with an empty environment, so simply
> checking to see if it's working from the command line isn't enough.
> I believe "/usr/bin/env -i ./pre-commit" will run your script in an
> empty environment.

Yes it is:

svn@svn hooks $ l pre-commit
-rwxr-xr-x 1 svn svn 32 May 20 13:29 pre-commit

svn@svn hooks $ cat pre-commit
#!/bin/bash
echo "hello"
exit 0

svn@svn hooks $ /usr/bin/env -i pre-commit
hello

svn@svn hooks $ echo $?
0

And that happens on the client side:

florianen@workplaces api $ svn ci -m 'testing hooks'
Sending api/func.data.php
Transmitting file data .svn: Commit failed (details follow):
svn: 'pre-commit' hook failed with error output:

The script is executable, it belongs to the user svn in the group svn.
The svnserve daemon runs as user svn in group svn.

Florian Engelhardt

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 20 13:35:57 2005

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.