[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: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-04-13 20:49:47 CEST

On Apr 13, 2005, at 1:42 PM, SteveKing wrote:
>
> I wanted to show the readonly state if:
> - the file is readonly
> - it's versioned
> - the lock owner is empty (i.e. it's not locked in the wc)
>
> That way users could immediately see that such a file needs to be
> locked before they can edit it.

The sentence you just wrote above -- "users could see that a file needs
to be locked" -- is *exactly* the reason the svn:needs-lock property
exists. If you're thinking about creating a new icon overlay that
means, "you should lock this file before editing", then you should make
it into a 1-to-1 correspondence with the existence of svn:needs-lock.

So your criteria for showing this new overlay would be:

    - the file is versioned && file has svn:needs-lock

That's all you need.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 13 20:54:39 2005

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

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