0

I need to configure a svn repository with lock-modify-unlock model. Also need that when a user checkout a project, all the files must have read-only permission set. When a user wants to modify a file, proceed to lock the file (this will set write perm to the file), and if another user wants to modify the file, he will not do that because he needs to lock the file to get write permission to the file.

Is it possible?

DaniG
  • 108
  • 10
  • possible duplicate of [Automatically add svn:needs-lock](http://stackoverflow.com/questions/711053/automatically-add-svnneeds-lock) – alroc Sep 25 '13 at 15:51
  • http://stackoverflow.com/questions/3749067/settings-a-svn-server-so-as-to-enable-lock-modify-unlock-mechanism-of-version-co is another duplicate (and the one I'd prefer to point at) but because there's no accepted answer, it can't be used for the "duplicate flag". – alroc Sep 25 '13 at 15:51
  • these answers don't consider file permissions. I need that files have read-only permissions. – DaniG Sep 25 '13 at 17:37
  • When you set `svn:needs-lock` on a versioned file, the read-only attribute in the working copy is set by Subversion when you check out or update. It will be un-set when you get a lock on the file, and then re-set when you commit or otherwise release the lock. If you're looking for something to dynamically change the path-based authorization in the repository itself, you're into messy hook scripts and a whole bunch of other things that would lead me to suggest that Subversion isn't the right tool for your requirements. – alroc Sep 25 '13 at 17:46
  • This sounds like a terribly onerous way to work. As alroc pointed out - you're going to have to write a ton of hooks to make this anything other than lip-service to the lock. You should just buy clearcase or some other overpriced byzantine system that has built in support for these outdated 'features' – thekbb Sep 25 '13 at 18:11

0 Answers0