[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: John Szakmeister <john_at_szakmeister.net>
Date: 2005-05-20 12:31:23 CEST

On Friday 20 May 2005 06:05, Florian Engelhardt wrote:
> Hello,
>
> it´s me again.
>
> On Fri, 20 May 2005 11:47:34 +0200
>
> Florian Engelhardt <f.engelhardt@21torr.com> wrote:
> > [...]
> > I also added the following line to the post-commit hook:
> >
> > echo "hello" >> /SVN/test/hooks/error_log
> >
> >
> > But there is no "hello" in that file :(
> > [...]
>
> I tried to write that simple pre-commit hook:
>
> #!/bin/sh
> # PRE-COMMIT HOOK
> REPOS="$1"
> TXN="$2"
> echo "$REPOS $TXN hallo\n" >> /SVN/test/hooks/error_log
> exit 0
>
> But that doesn´t work neither, if i try to commit something i
> get this error message:
>
> florianen@workplaces api $ svn ci
> Sending api/func.data.php
> Transmitting file data .svn: Commit failed (details follow):
> svn: 'pre-commit' hook failed with error output:
>
> svn: Your commit message was left in a temporary file:
>
>
> And the error_log file is still empty :(

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.

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 20 12:37:54 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.