You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Manuel Reyes <Ma...@e-mis.com> on 2005/09/12 09:57:34 UTC
SVN and Locks
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?
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)?
The reason I need to do this is that I am working on a projects whose
files do not merge successfully
Regards
Manuel
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: SVN and Locks
Posted by Ben Collins-Sussman <su...@collab.net>.
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?
http://svnbook.red-bean.com/nightly/en/svn.advanced.locking.html
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