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

RE: pre-revprop-change Script Runs Twice and Fails for Some Revisions, Runs Once and Succeeds for Others

From: Alon Tal <AlonT_at_radcom.com>
Date: 2005-06-28 11:06:49 CEST

Some additional information I just found out:
The repository has moved servers recently -- (full dump and load).

All revisions earlier than the dump/load cannot have their revprops
changed.
All revisions that are more recent can have their revprops changed with
no problem.

Thanks again,
Alon

-----Original Message-----
From: Alon Tal
Sent: Tuesday, June 28, 2005 07:18
To: users@subversion.tigris.org
Subject: pre-revprop-change Script Runs Twice and Fails for Some
Revisions, Runs Once and Succeeds for Others

Hello all,

On the same repository, setting the 'svn:author' revision property
succeeds
for some revisions, but fails for others.
The error message is:
--------
svn: DAV request failed; it's possible that the repository's
pre-revprop-change hook either failed or is non-existent
svn: At least one property change failed; repository is unchanged
--------

I added some 'echo >> tmpfile' statements to my pre-revprop-change
script, and I saw that in cases where the
change fails, the script actually runs TWICE, whereas if it succeeds, it
only runs ONCE.

I am using Subversion 1.1.4 (r13838) on Debian, with Apache as the
server.

Here is an 'ls -l' of the hooks directory:
------------------------------
servername:/svn/abc/hooks# ls -l
total 28
-rw-r--r-- 1 www-data www-data 1390 2005-06-09 15:11 post-commit.tmpl
-rwxr-xr-x 1 www-data www-data 1509 2005-06-27 08:10
post-revprop-change
-rw-r--r-- 1 www-data www-data 1508 2005-06-09 15:11
post-revprop-change.tmpl
-rw-r--r-- 1 www-data www-data 2363 2005-06-09 15:11 pre-commit.tmpl
-rwxr-xr-x 1 www-data www-data 2251 2005-06-28 06:33 pre-revprop-change
-rw-r--r-- 1 www-data www-data 1952 2005-06-09 15:11
pre-revprop-change.tmpl
-rw-r--r-- 1 www-data www-data 1533 2005-06-09 15:11 start-commit.tmpl
------------------------------

This is the what the pre-revprop-change script looks like:
--------------------------------------
REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"

#if [ "$PROPNAME" = "svn:log" ]; then exit 0; fi
#exit 1

if [ "$PROPNAME" = "svn:author" ]; then
  echo "=========" >> /tmp/auth.txt
  echo "svn:author" >> /tmp/auth.txt
  echo $REPOS >> /tmp/auth.txt
  echo $REV >> /tmp/auth.txt
  echo $USER >> /tmp/auth.txt
  echo $PROPNAME >> /tmp/auth.txt
  echo "++++++++" >> /tmp/auth.txt
  exit 0;
fi

exit 0
--------------------------------------

Finally, just for completeness, here is a sample of this behavior:
--------------------------------------
alont@host:/mgmt$ svn propset --revprop -r886 svn:author "AlonT"
property 'svn:author' set on repository revision 886
alont@host:/mgmt$ svn propset --revprop -r849 svn:author "AlonT"
svn: DAV request failed; it's possible that the repository's
pre-revprop-change hook either failed or is non-existent
svn: At least one property change failed; repository is unchanged
--------------------------------------

I have focused on 'svn:author', but all the above details seem to apply
for 'svn:log', as well (without the check for 'svn:author' in the
script, obviously).

Many thanks,
Alon

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jun 28 10:10:20 2005

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.