« Return to Thread: Warning: post-commit hook failed (exit code 255) with no output.

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

by Ryan Schmidt-42 :: Rate this Message:

Reply to Author | View in Thread

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@...
For additional commands, e-mail: users-help@...

 « Return to Thread: Warning: post-commit hook failed (exit code 255) with no output.