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

Re: How to find out if I own a lock?

From: SteveKing <steveking_at_gmx.ch>
Date: 2005-04-13 21:24:17 CEST

Ben Collins-Sussman wrote:

> Ah, so it seems that you want to implement inverse logic.
>
> The logic should be:
>
> if (versioned && has-no-lock-token)
> if (svn:needs-lock is present)
> show "should lock" overlay
>
> But you want to do
>
> if (versioned && has-no-lock-token)
> if (readonly)
> show "should lock" overlay.
>
> But as cmpilato pointed out, those logics aren't equivalent. A file can
> be read-only for other reasons besides the existence of svn:needs-lock.
> Is this going to cause problems? I forsee lots of false positives
> here. Is it worth the performance tradeoff?

I know those logics aren't equivalent. But Subversion would have
problems with versioned readonly files if they don't have the
svn:needs-lock property on them, right? I mean, versions < 1.2 at least
will error out if such a readonly file has to be changed by an update.
So I don't think that there are any users out there who have files set
readonly themselves for whatever reason.

And yes: performance is *the* big issue here. We already had a lot of
complaints about performance with TSVN in the past. We did everything to
improve that performance by caching whatever is cacheable to reduce
calls to svn_client_status() and filestat calls. So I don't like the
idea of now adding filestat calls again which will decrease performance
a lot (in fact, a filestat call is so expensive we got rid of them in
our cache almost completely - we rather have the cache contain outdated
data for some time than doing those calls).

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 13 21:25:09 2005

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