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

Re: executing hooks fails (SVN 1.4.6 on linux)

From: Ignacio González T. <igtorque_at_eliop.es>
Date: Mon, 09 Feb 2009 13:42:28 +0100

El 6 Feb 2009 a las 22:07, Peter Gliwa escribió:

> 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!

Are you sure httpd is using user www-data or group www-data
to execute the hook?

--
Saludos,
  Ignacio González Torquemada
  NÚCLEO C.C.                  Departamento de I+D+i
  http://www.nucleocc.com  mailto:igtorque@eliop.es
  Tel. +34 91 383 57 47       Fax. +34 91 302 92 49
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1128968
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-02-09 13:44:38 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.