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

Pre-commit fails when executing 'svn ls'

From: <armando.perico.neto_at_usi.ch>
Date: Wed, 28 Nov 2012 15:43:57 +0000

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
Received on 2012-11-28 16:44:34 CET

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.