Hi,

I want to write a pre-commit hook which make some checks on the repository 
using "svn" commands. i.e.: svn ls... however, svn ls is failing to connect to 
localhost.

on my pre-commit file I have:
-----------------------------------------------
# I don't need the $REPOS value since this is just a test
svn ls http://localhost/svn/repo/ --username=X --password=Y --non-interactive
exit 0
-----------------------------------------------

The script works fine when I run it "manually" (even when I run it with the 
"apache" user)

example:
sudo -u apache env /var/www/svn/hooks/precommit (works ok)
su -s /bin/sh apache -c "/var/www/svn/hooks/precommit" (works ok)

however, when I run it with any "svn client" I get the following:
....
svn: OPTIONS of 'http://localhost/svn/repo/test.txt": could not connect to 
server (http://localhost)
....

I can't understand why it is failing. Would anybody have a suggestion ?


Thanks


Reply via email to