Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.2.x
-
None
Description
As described here: http://svn.haxx.se/users/archive-2006-04/0457.shtml Suppose you have: 1. A working copy, checked out using ra_dav , containing a file "a.txt" 2. At the server exists a pre-commit hook script like : #!/bin/sh echo svnadmin lslocks: >&2 /usr/bin/svnadmin lslocks /svn/repos/repoTest >&2 echo svnlook lock: >&2 /usr/bin/svnlook lock /svn/repos/repoTest a.txt >&2 exit 1 Invoking: #svn lock a.txt #svn move a.txt ren.txt #svn ci –m “comment” says : Deleting a.txt Adding ren.txt svn: Commit failed (details follow): svn: MERGE request failed on '/svn/repoTest' svn: 'pre-commit' hook failed with error output: svnadmin lslocks: svnlook lock: The svnlook neither svnadmin list the lock on file a.txt # svn info a.txt Says : …. Schedule: delete …. Lock Token: opaquelocktoken:7d7927dd-3511-0410-af89-e229e88c670e Lock Owner: svn Lock Created: 2006-04-12 09:22:28 +0300 (Wed, 12 Apr 2006) The working copy has the lock token. At the server hosting the repository: #svnadmin lslocks $repopath says nothing… lock is released from repository. The server hosting the repository is an Red Hat Enterprise Linux AS release 3 The svn --version says 1.2.3 (r15833) The svnserve –version says 1.2.3 (r15833) http throw Apache reporting version: apache2-2.0.55 I tried on svn version 1.3.0 (r17949), and svnserve version 1.3.0 (r17949) with the same result. Bellow is a unix shell script to reproduce this problem. --script start---- #!/bin/sh ############### # Change the : # REPO , URL and WC # to meet your configuration ############### REPO=/tmp/repoTest URL_REPO=http://server/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 #!/bin/sh echo svnadmin lslocks: >&2 /usr/bin/svnadmin lslocks $REPO >&2 echo svnlook lock: >&2 /usr/bin/svnlook lock $REPO a.txt >&2 exit 1 EOF chmod 777 $REPO/hooks/pre-commit cd $WC svn lock a.txt svn move a.txt ren.txt echo echo echo --------------- echo svn ci echo --------------- svn ci -m "rename file a.txt to ren.txt" echo echo echo --------------- echo svn info a.txt echo --------------- svn info a.txt echo echo echo ------------------ echo svnlook lock a.txt echo ------------------ svnlook lock $REPO a.txt echo echo --sctipt end----
Original issue reported by karatzasm