RE: Hook Script problem with no error output
From: Kostas Rondinoulis <rondinos_at_hotmail.com>
Date: 2007-10-11 05:14:23 CEST
I haven't seen any hook scripts that have a return 0 at the end. I am just trying to make a shell script that will do an echo and send it to a /tmp file. My main goal is to do a post-commit script that will do an svn update. I've tried the following two lines: #!/bin/sh/usr/local/bin/svn update /usr/home/virtual/user1/html/ --username apache --password SVNPASS 2>&1 >> /tmp/svn-post-commit.log The username apache is not a real unix account, it's just an svn account located in myrepo/conf/passwd.My /usr/home/virtual/user1/html dir is recursively owned temporary by the svn user just so I can make my script work without problems/sudo etc. This script works perfect it somebody runs it individually, even the user1 has access to execute but it doesn't work on commit. I have also tried to chmod 777 the script and chmod +s but unfortunately that didn't make any difference. So since I couldn't make the svn update script to work, I am just trying to do a simple echo in a /tmp file, but that doesn't work either.I am out of ideas for tonight, I will try again tomorrow to see if I will have a better luck.
Date: Thu, 11 Oct 2007 11:38:13 +1000From: lakshman.srilakshmanan@police.vic.gov.auTo: rondinos@hotmail.comCC: users@subversion.tigris.orgSubject: RE: RE: Hook Script problem with no error output
did you put a "return 0" at the end of your script
From: Kostas Rondinoulis [mailto:rondinos@hotmail.com] Sent: Thursday, 11 October 2007 8:25 AMTo: Larry MartellCc: users@subversion.tigris.orgSubject: RE: Hook Script problem with no error output
> Date: Wed, 10 Oct 2007 15:33:43 -0600> From: larry.martell@gmail.com> To: rondinos@hotmail.com> Subject: Re: Hook Script problem with no error output> CC: users@subversion.tigris.org> > On 10/10/07, Kostas Rondinoulis <rondinos@hotmail.com> wrote:> >> > I am very surprised why my hooks script don't work.> >> > I just made a pre-commit script with one line:> > /bin/echo "Script is running" >> /tmp/svn-test.log> >> > I am not using any enviroment variables, so my script works perfectly in an> > empty enviroment and the permissions are set properly.> > I have tested with env - ./pre-commit and the script works perfectly. I> > have tried to run the server in the foreground, but it doesn't give me any> > output there either.> >> > When I try to commit, I get the following error:> >> > [rondin@webdev ~/html]$ svn ci -m "testing" .> > Deleting test5> > Adding test6> > subversion/libsvn_client/commit.c:865: (apr_err=165001)> > svn: Commit failed (details follow):> > subversion/libsvn_repos/hooks.c:135: (apr_err=165001)> > svn: 'pre-commit' hook failed with error output:> >> > I am running svnserve, version 1.4.4 (r25188).> >> > Is there any way to find out why the scripts are not working and why am I> > getting a blank error output?> > Try writing to stderr instead of stdout.
Explore the seven wonders of the world Learn more! ================================================================================================
This email and any attachments are confidential. They may also be subject to copyright.
If you are not an intended recipient of this email please immediately contact us by replying
You must not read, use, copy, retain, forward or disclose this email or any attachment.
We do not accept any liability arising from or in connection with unauthorised use or disclosure
We make reasonable efforts to protect against computer viruses but we do not accept liability
_________________________________________________________________
|
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.