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

Re: SVN Functionality: loss of locks when switching to a branch

From: Ulrich Eckhardt <eckhardt_at_satorlaser.com>
Date: Fri, 3 Sep 2010 12:28:34 +0200

On Friday 03 September 2010, REYNOLDS, Dylan wrote:
[locking a file and switching the WC loses the lock info for the WC]
> In my opinion, if the lock exists in the repository, under your user name,
> then why can't this information be pushed in to your working copy when you
> make the update/switch/checkout?

To which of all your multiple working copies do you want to push the lock? I'd
say that SVN is right that it connects the lock to both the user and one
specific working copy, otherwise you could commit changes from one of your
WCs that conflict with changes in a different WC.

> A check should be performed for repository locks that belong to the
> username checking out (or switching) that working copy. If the usernames
> match then you should get your lock, along with the files.

What SVN should IMHO do is tell you when an operation on a WC would break the
association between a lock and that WC, like the switch seems to have done.
It could even remember the lock and restore it when switching back.
Otherwise, you don't have to use "switch" to create a branch or afterwards,
you can also check out a new WC. Further, it would make sense to lock the
file in both the trunk and the branch, and do both in separate working
copies. Lastly, educating people why they must steal their own lock (bound to
working copy, not just user) should be pretty easy.

> I understand that locking is an "extra" functionality of svn. However, it
> can be very useful for some files and it seems under supported in svn.

No doubt about that, I believe that initially it was seen as wrong approach by
many people but is now recognised as valuable and necessary feature. It's not
a second-class feature.

Cheers!

Uli

-- 
ML: http://subversion.tigris.org/mailing-list-guidelines.html
FAQ: http://subversion.tigris.org/faq.html
Docs: http://svnbook.red-bean.com/
Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************
Received on 2010-09-03 12:29:14 CEST

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.