[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: Tobias Schäfer <tobiasschaefer_at_gmx.de>
Date: 2006-05-16 23:26:12 CEST

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.

> 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?

Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Tue May 16 23:26:59 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.