On 4/12/06, Madan U S <madan@collab.net> wrote:
>
>
>
>
> On Wed, 12 Apr 2006 14:14:54 +0530,
>
> > Michalis Karatzas
> > <michalis.karatzas@gmail.com> wrote:
> >
> > On 4/11/06, Garrett Rooney
> > <rooneg@electricjellyfish.net> wrote:
> > On 4/10/06, Michalis Karatzas
> > <michalis.karatzas@gmail.com> wrote:
> > > ------
> > > setup
> > > ------
> > >
> > > I setup a svn repository accessible
> > throw apache2 http for the
> > > needs of a project.The project has a
> > lot of binary files so we
> > > end up using the Lock/Modify/Unlock
> > mode and this lead me to
> > > write some hook scripts to force the
> > users to work in that mode
> > > (e.g. All file in the repository has
> > to have a needs-lock
> > > property set, every change on the
> > repository must be on files
> > > locked by the transaction owner, etc)
> > > All the svn clients access the
> > repository throw http and apache2
> > >
> > >
> > > ------------
> > > The problem:
> > > ------------
> > >
> > >
> > > A repository user locks a file (
> > fileA ) and moves to fileB:
> > > >svn lock fileA
> > > >svn move fileA fileB
> > >
> > >
> > > So far all is ok.
> > >
> > >
> > > When the user commits the changes
> > and the pre-commit fails, so
> > > the transaction fails, the locks
> > between the working copy and
> > > the repository are inconsistent. (
> > e.g. the lock on
> > > the fileA at repository have been
> > released ! )
> >
> > I just tried to reproduce this here,
> > and it looks like a bug to me.
> > If you could file an issue that would
> > be great. Note that it doesn't
> > require apache + mod_dav_svn, you can
> > get the same behavior with
> > ra_local.
> >
> > -garrett
> >
> > thank you Garrett for the reply.
> >
> > I spend some more time on this and
> > i wondering if there are two bugs here:
> >
> > 1. Inside pre-commit script the
> > "svnlook lock" or "svnadmin lslocks"
> > does not list the lock on the
> > file.
> >
> > 2. In case of using ra_dav, after
> > the unsuccessful commit
> > the lock is released form the
> > repository.
> >
> > Can please anyone try to reproduce the
> > second one, so I can be sure
> > before I file those issues?
>
> I tried to reproduce it....
>
> I did...
> 1) svn lock file
> 2) svn info
> lists, among other info....
> Lock Token: opaquelocktoken:a599b17e-
> 3811-0410-ae9b-9039c9c8b1da
> Lock Owner: madan
> Lock Created: 2006-04-12 15:00:48 +0530
> (Wed, 12 Apr 2006)
> 3) modify file
> 4) svn ci file -m "comment", says...
> Sending trags/file
> Transmitting file data .svn: Commit
> failed (details follo
> w):
> svn: 'pre-commit' hook failed with
> error output:
> 5) svn info a.txt , says ...
> <doesnt list the lock info>
> However, when I try to lock the file
> again,
> 6) svn lock file
> svn: warning: Path '/trags/file' is
> already locked by user 'madan' in
> filesystem '/tmp/repos-test/db'
>
> So, I think the lock is NOT released
> from the repository, even though the
> working copy seems to have lost the
> information about the lock itself.
>
> Regards,
> Madan.
>
>
Thanks Madan for your fast reply.
Sorry. I suppose my English are not so good,
so I can not explain well to you what I mean.
The second bug occurs only when using ra_dav, and when
renaming a locked file.
did you rename the file or gust changed it ?
what I did: ( this may be more readable than my English )
My pre-commit script :
#!/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
1) svn co http://server/repoTrest
2) svn lock a.txt
3) svn move a.txt ren.txt
4) 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:
here is the fist bug. locks are not reported inside the hook script.
5) 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)
6) svnadmin lslocks /svn/repos/repoTest
says nothing…
lock is released from repository but exists on working copy.
To make the working copy usable again must do:
7) svn revert a.txt
8) svn revert ren.txt
9) rm ren.txt
9) svn update
says:
B a.txt
At revision 1.
10) svn info a.txt
says:
Path: a.txt
Name: a.txt
URL: http://146.124.226.138/svn/repoTest/a.txt
Repository UUID: 7dad8dd4-cd10-0410-9524-cf8073a4e8f7
Revision: 1
Node Kind: file
Schedule: normal
Last Changed Author: svn
Last Changed Rev: 1
Last Changed Date: 2006-04-07 05:20:55 +0300
Text Last Updated: 2006-04-12 09:37:17 +0300
Properties Last Updated: 2006-04-12 09:38:09 +0300 (Wed, 12 Apr 2006)
Checksum: 1555971975b5d6a8a18b74c53b67838f
thanks for your time,
michalis
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Apr 12 13:30:42 2006