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

RE: Needs lock + move

From: Hans-Emil Skogh <Hans-Emil.Skogh_at_tritech.se>
Date: Wed, 27 Apr 2011 07:07:45 +0000

>>>> I noticed today that you don't need to acquire the lock to move a
>>>> file that has the needs-lock property set.
>> However, I think it would make sense to implement this in TortoiseSVN.
>> Providing a warning is pretty straight forward, at least in the case
>> of a move/rename where we always display a dialog anyway. (Delete is
>> a little bit different. Then we would need to pop up a warning dialog
>> where there usually is no dialog at all. Maybe not ideal...) I think
>> this is a good idea here as additional information/a reminder to the
>> user. Even if core SVN has decided to omit it.
>
> The lock is there to prevent a commit unless you have the lock.
> svn:needs-lock is used to set the read-only state as a warning not to
> waste your time editing the file without first getting the lock.

Exactly! Good summary.

> Delete and rename are somewhat different cases; without the lock you
> cannot commit the delete or rename, but even if you go ahead and
> delete a file in the WC and are then unable to commit, you have not
> wasted a lot of effort.

Maybe, maybe not. Ideally you are communicating with the other committers anyway, so none of this locking business is needed at all. If you do not, however, and perhaps commit a bit more seldom than optimal, trying to get the lock *before* going on to delete/move a file is definitely a good idea. Either in the benefit for someone else who would otherwise put (maybe a lot of) work into a file that will be deleted, or for yourself if you have (or want) to make changes to the file after you have moved it that cannot be merged later on.

> The only case I could come up with where client side work is wasted
> is if you are doing some major renaming work which you are then
> unable to commit.

That is also a frustrating situation.

Hans-Emil

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2724514

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-04-27 09:07:56 CEST

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

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