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

when moving a locked file and the pre-commit hook fails the repos itory looses the lock

From: Karatzas Michalis (michalis.karatzas_at_intracom.gr) <(michalis.karatzas_at_intracom.gr)>
Date: 2006-04-07 15:46:49 CEST

I tried to move a file that a have previously locked. When
commiting the changes and for some reason the pre-commit
hook fails, the lock remains in my working copy, but at the repository
the lock is released.
 
It is only happens when accessing the repository throw http (apache2)
 
I do something wrong ?
 
Here is a sample script to reproduce the problem:
 
--script start--------------------------------------------------------------

#
#
# Change the next 3 lines to meet your configuration
REPO=/svn/repos/repoTest
URL_REPO=http://svnserver/svn/repoTest
WC=`pwd`/wc
 

rm -rf $REPO $WC
svnadmin create $REPO
 
svnadmin load $REPO <<EOF
SVN-fs-dump-format-version: 2
 
UUID: 7dad8dd4-cd10-0410-9524-cf8073a4e8f7
 
Revision-number: 0
Prop-content-length: 56
Content-length: 56
 
K 8
svn:date
V 27
2006-04-07T02:15:27.237635Z
PROPS-END
 
Revision-number: 1
Prop-content-length: 128
Content-length: 128
 
K 7
svn:log
V 30
First Commit added file a.txt
 
K 10
svn:author
V 3
svn
K 8
svn:date
V 27
2006-04-07T02:20:55.871982Z
PROPS-END
 
Node-path: a.txt
Node-kind: file
Node-action: add
Prop-content-length: 36
Text-content-length: 25
Text-content-md5: 1555971975b5d6a8a18b74c53b67838f
Content-length: 61
 
K 10
needs-lock
V 5
a.txt
PROPS-END
This is the file 'a.txt'
 

EOF
 

svn co $URL_REPO $WC
 
cat > $REPO/hooks/pre-commit <<EOF
echo "this is for test only" >&2
exit 1
EOF
 
chmod 777 $REPO/hooks/pre-commit
 
cd $WC
svn lock a.txt
svnlook lock $REPO a.txt
svn move a.txt ren.txt
svnlook lock $REPO a.txt
svn ci -m "rename file a.txt to ren.txt"
 
 
 
echo
echo
echo
echo Running svnlook lock a.txt
echo
svnlook lock $REPO a.txt
 
--scipt end----------------------------------------------------------------
 
 
 
PS. if my English look's like Greek to you, it is because I am form Greece
... sorry.
 
 
 
 
Received on Fri Apr 7 15:59:36 2006

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.