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

executing hooks fails (SVN 1.4.6 on linux)

From: Peter Gliwa <peter_at_gliwa.com>
Date: Fri, 6 Feb 2009 22:07:57 +0100

Dear SVN experts,

I am having problems getting hooks to run properly with SVN 1.4.6 under
Apache/2.2.8 (Ubuntu 8.04).
E.g. the pre-revprop-change hook which is required to allow changing a log
message:

The script is the original version as delivered with SVN:
#!/bin/sh
REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"
if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi
echo "Changing revision properties other than svn:log is prohibited" >&2
exit 1
 
The rights are set correctly and the hook is located at the right place. The
hook runs perfectly when executed in a shell. I even followed the hints of
the FAQ to make sure, I am not using any environment variables: run as
www-data user in an "empty" shell:

su www-data

ls -l /svn/repos/hooks/pre-revprop-change
-rwxrwsrwx 1 www-data www-data 2763 2009-02-06 21:56
/svn/repos/hooks/pre-revprop-change

$ env - /svn/repos/hooks/pre-revprop-change foo bar foo svn:log M
$ env - /svn/repos/hooks/pre-revprop-change foo bar foo svn:log invalid
Changing revision properties other than svn:log is prohibited

The first call imitates a correct change-log modification (leading to no
output: correct), the second an invalid (resulting in the desired
error-message: correct).

I have tried a lot but have no idea what I am doing wrong.

Can anyone help? Thanks in advance!

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1114767

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-02-06 22:09:24 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.