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

RE: Hook Script problem with no error output

From: Kostas Rondinoulis <rondinos_at_hotmail.com>
Date: 2007-10-11 21:41:58 CEST

Well unfortunately you are wrong, because my script worked that way.
 
Script:
#!/bin/sh
/usr/local/bin/svn update /usr/home/virtual/itravel/html/ --username <USER> --password <PASS> >> /tmp/svn-post-commit.log
As a user:
 
[user1@webdev ~/html]$ svn mv test2 test3A test3D test2[user1@webdev ~/html]$ svn ci -m "moving to test3" .Deleting test2Adding test3
Committed revision 27.
Warning: 'post-commit' hook failed with error output:
 
As root:
 
webdev# whoamirootwebdev# su -m svnYou have mail.webdev# /usr/local/bin/bash[svn@webdev /usr/local/svn/hooks]$ whoamisvn[svn@webdev /usr/local/svn/hooks]$ ./post-commit $PWD 999[svn@webdev /usr/local/svn/hooks]$ cat /tmp/svn-post-commit.logD /usr/home/virtual/itravel/html/test2A /usr/home/virtual/itravel/html/test3Updated to revision 27.
As a user again:
 
[user1@webdev ~/html]$ svn mv test3 test4A test4D test3[user1@websdev ~/html]$ svn ci -m "moving to test4" .Deleting test3Adding test4
Committed revision 28.
Warning: 'post-commit' hook failed with error output:
[user1@aerasdev ~/html]$
And as svn user, continued from previous session:
[svn@aerasdev /usr/local/svn/hooks]$ env -i ./post-commit[svn@aerasdev /usr/local/svn/hooks]$ tail /tmp/svn-post-commit.logD /usr/home/virtual/itravel/html/test2A /usr/home/virtual/itravel/html/test3Updated to revision 27.D /usr/home/virtual/itravel/html/test3A /usr/home/virtual/itravel/html/test4Updated to revision 28.
As you see the script works perfectly, with no permission or enviroment problems.
If you have any more suggestions how to debug or possibly make it work, I would appreciate.

> Date: Thu, 11 Oct 2007 15:07:08 -0400> From: john.peacock@havurah-software.org> To: rondinos@hotmail.com> CC: jeremyp@jeremyp.net; users@subversion.tigris.org> Subject: Re: Hook Script problem with no error output> > Kostas Rondinoulis wrote:> > No, that's not possible. svn user is svn, /tmp/svn-test.log belongs to > > svn user but it also has 666 permissions and anybody can read and write > > there. I don't believe it's a permission issue, I wish I had a way to > > find out how I can debug it,> > I've got a much longer e-mail in my Drafts folder at home, which I'll > send later tonight, but the short answer is:> > Don't debug commit scripts using Subversion until you have debugged > using the same user outside of Subversion. At least 50% of the > difficulties people have with commit scripts is user rights (even though > you think you've already checked that).> > So, what you need to do is run that script in a shell as the user svn, ala> > $ su> # su -s /bin/bash svn> $ cd /path/to/repos/hooks> $ ./post-commit $PWD 999> > It won't work for some reason and this will tell you what is going on. > It could be that you forgot to set the executable bit on post-commit. > It could be that the rights _are_ funky on the file. Whatever. Only > when this works will you be able to do it as part of a Subversion commit.> > I'll finish up my fuller discussion of writing/debugging commit scripts > and post it tonight...> > John> > ---------------------------------------------------------------------> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org> For additional commands, e-mail: users-help@subversion.tigris.org>
_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
Received on Thu Oct 11 21:42:55 2007

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.