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

Re: SVN and Locks

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

On Sep 12, 2005, at 4:57 AM, Manuel Reyes wrote:

> Hello List,
> Please correct me if I am barking up the wrong tree here.
> I am under the impression that if I checkout and item and then get the
> "lock" for that file then nobody else can update that item until I
> release the lock, is this the case?

Correct. If you lock a file, then the repository will prevent anyone
else from committing a change to it.

> If so is it possible to create a repository that will only allow
> locked
> access (i.e. you checkout with a lock or you don't check out at all)?

Yes, you can certainly write a pre-commit hook script to enforce
this. The script would examine all of the paths someone is
attempting to commit, and make sure that every one of them is locked...

Have you read the documentation on svn locking yet?


The recommended procedure is to specifically mark un-mergeable files
as "needing a lock". This causes the files to have read-only
permission in everyone's private sandboxes. When you lock the file,
it becomes read-write.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Sep 12 12:12:41 2005

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

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