Search code examples
svntortoisesvnvisualsvn

Single user checkout in SVN


I want to do the following:

When one user is editing a file from SVN, no other user can edit this file until the first user commits his changes. That is there would be some kind of writelock on files in svn.

Is this possible in SVN? How to do it? Is it possible to set this for a single file or directory (not for the whole repository)?

Why would this be useful? Conflicts on binary and some other files cannot be easily resolved. I would like to set my excel files in svn to be write locked in the way described above.

I would welcome guide on how to do this in VisualSVN or TortoiseSVN which I use.


Solution

  • You can set the property svn:needs-lock on such files, then the file gets checked out "read only". If you want to edit it, you have to lock the file with svn lock. That workflow is there for exactly this case.

    See here http://svnbook.red-bean.com/en/1.5/svn.ref.properties.html for info on svn:needs-lock.