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

Re: Question on lock behaviour

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-04-09 16:04:25 CEST

On Apr 9, 2005, at 4:12 AM, Norbert Unterberg wrote:

> I have some questions regarding locking, I have not found the answeres
> in the locking GUI/implementation docs or release notes, so I'm asking
> here:
>
> * Does locking depend on the svn:needs-lock property, or is locking
> allowed on all files, even if they do not carry the needs-lock
> property (giving a "locking is optional" behaviour)?

Locking is allowed on all files. The needs-lock property is just an
optional communication mechanism to encourage locking on certain files.

> If locking is optional, will locked files get the read-only attribute
> on an update if someone else has locked the file?

No.

>
> * Is it allowed to lock multiple files in one command, like
> "svn lock *.bin"?

Yes.

> If yes, is this some kind of an atomic operation, meaning:

It's not atomic as a group, each attempt to lock a file is a separate
event that could fail or succeed.

> - same lock comment used for all files?

Yes.

> - repository lock-hook called once with a file list or once per file?

At the moment, yes, but that will probably change in 1.3. The new lock
hooks are designed to work on lists of files, but they're not being
invoked that way (yet.)

> - no problem with concurrency when two users try the lock the same
> group of files at the same time.

There is absolutely a race. Someone gets the lock first, the other is
bounced out. Just like commits.

>
> * Does locking/unlocking a file without modifying the file require
> write access rights (in terms of mod_auth_svn)?

Yes.

>
> * Is it possible to lock a directory (i.e. with the effect of locking
> all files in that directory)?

No.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Apr 9 16:05:53 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.