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

Re: Get lock without needs-lock message

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2006-05-17 09:30:23 CEST

On 5/16/06, Tobias Schäfer <tobiasschaefer@gmx.de> wrote:
> On Tuesday 16 May 2006 22:13, Stefan Küng wrote:
> > checking it in BASE is useless: if it isn't set in WC, then having it
> > set in BASE means the user has *removed* the property. Checking in HEAD
> > means checking the repo, which we don't do in the commit dialog.
> Why is BASE useless?
> I can only think of three places to look: in the WC, in BASE and in HEAD. If
> all three are not the right place where do we look?
> Ok, we agree that contacting the repository to fetch the property value of
> HEAD is not wanted. It would be the best place to look if it didn't have
> the disadvantage that a repository access is needed.
> The next best guess to get the current value of the property is to look in
> BASE. Assuming regular updates this value is the same as that in HEAD.
> IMHO, this is the correct value to evaluate when deciding if the warning
> should be shown.
> If the user attempts to lock files which don't have svn:needs-lock set, then
> a warning ist shown.
> Looking in the WC is not totally wrong but a worse guess that looking in
> BASE: The user might have set or removed that property without committing.

Hmm - I think I misunderstood how this feature is supposed to work.
Of course, you're right. BASE is better than WC here.

> > You're reading the property for *every file*. That will increase the
> > time until the commit dialog is ready a lot.
> > But since we're dealing here with Subversion 1.4, please have a look at
> > the new status information: the svn:needs-lock property is now stored in
> > the .svn\entries file, which means you can get it from the status
> > struct. That will only require a few more CPU cycles, but not any file
> > access and therefore will be *much* faster.
> Ok, that will surely be faster than my approach but it will always return
> the values of BASE, right?

No, from WC (not BASE). Because 'svn st' is for WC.
Of course I could be wrong - I haven't checked the code of that
because until now it wasn't really that important.


  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.tigris.org
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed May 17 09:30:34 2006

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.