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

Re: Warning: post-commit hook failed (exit code 255) with no output.

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Thu, 31 Jul 2008 22:43:22 -0500

On Jul 31, 2008, at 22:29, Xinhao Zheng wrote:

> Ryan Schmidt wrote:
>
>> On Jul 31, 2008, at 21:13, Xinhao Zheng wrote:
>>
>>> I meet those output when make use of post-commit hook to update
>>> live site working copy.
>>> i use apapche + mod_dav.
>>> the post-commit script can run with no error when i use env - ./
>>> post-commit command.
>>> and the user the server run on have the full permisstion on the
>>> working copy.
>>
>> What does your post-commit hook say?
>
> i am under linux debian, this is my post-commit content:
>
> REPOS="$1"
> REV="$2"
> /home/svn/wzo/hooks/svn-update.sh
>
> this is content for svn-update.sh
> svn update /home/www/html/wzoprj/project/mylib --username 'george'
> --password 'xxxx'
>
> is there any error in the script,it can run from command line,and
> if i put one line in the front of the script to test if the script
> run,it seems to yes.(date>/var/tmp/a.txt)

There is no PATH set when Subversion runs the hook script, so you
must set it yourself or use absolute paths to every executable. For
example, in svn-update.sh, instead of "svn", use "/usr/bin/svn", or
wherever svn actually is on your system.

Your post-commit must also begin with a line like "#!/bin/sh" and
have its executable bit set.

You should probably add the --non-interactive flag when you call svn
so that svn doesn't attempt to do anything interactive.

You should probably log the error output of the svn command somewhere
by appending "2>/path/to/log". You might also want to check the exit
status of the svn command and do something if an error occurs (like
send an email to an administrator).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-01 05:43:51 CEST

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.