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

Re: Determine on which machine the lock for any given file is

From: Dave Lawrence <dlawrence_at_ad-holdings.co.uk>
Date: Mon, 18 Aug 2008 14:20:37 +0100

Andy Levy wrote:
> On Mon, Aug 18, 2008 at 05:08, Jac <skobbejac_at_gmail.com> wrote:
>> Background:
>>
>> Our infrastructure is one where our developers tends to work on the
>> same applications but in different locations (i.e. sometimes on their
>> laptops, sometimes on servers etc). We use SVN extensively to govern
>> this process with much success. The files that we're working with are
>> in a proprietary binary format, so we set the needs-lock property on
>> all of them. Note that sometimes a developer gets the lock on a file
>> on his laptop, and sometimes on one of our servers. From the
>> repository browser (and some other options) it is easy to determine
>> which developers have locks on which files, but not on which
>> machines. Potentially one might even be interested in the location
>> (folder) on the particular machine. When trying to get the lock on
>> different machine (even the same developer) will get an error message
>> like:
>>
>> Error: Path
>> Error: /trunk/myfiles/myfile.dat
>> Error: is already locked by user 'jac' in filesystem 'D:/SVN/db'
>>
>>
>> D:\SVN\ is the location of the repository (that seems like stating the
>> obvious).
>>
>>
>> I'd like something like:
>>
>> Error: Path
>> Error: /trunk/myfiles/myfile.dat
>> Error: is already locked by user 'jac' on '192.168.0.23' in 'c:
>> \projects\myfiles'
>>
>>
>> Question:
>>
>> Is there a way to determine on which machine (using IP-address or
>> similar) the lock for any given file is held in addition to who is
>> holding it?
>
> This would require support from the core Subversion libraries &
> server, not the clients built upon those libraries. Right now locks
> are per user so only the user is recorded.

Users are also invited to enter a lock message when locking the file.
You could adopt a policy that the user should provide this info (ip addr
etc) in the lock message. One stage further would be to write a
pre-lock hook script (server side) that insists this info is provided

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: users-help_at_tortoisesvn.tigris.org
Received on 2008-08-18 15:20:56 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.