Page 1 of 1

Automatically lock files when committed

PostPosted: Tue Oct 16, 2007 11:30 pm
by john1lai
Is there a way to automatically lock files when they are committed so that other users would have to unlock them in order to make any edits?

Thanks,
John

PostPosted: Wed Oct 17, 2007 9:29 am
by sorin
Hello,

Usually a SVN user locks a file when he wants to be the only one who modifies it on the repository and unlocks it after he commits his modifications in order to allow other users to modify it. So normally a commit operation should either unlock the file to allow other users to modify it or keep the lock to allow only the current user to modify it. This is what the Commit dialog of Syncro SVN Client offers with the Keep locks checkbox. I think it is not very frequent to lock a file when a new revision is committed but probably you can implement that with a hook script installed on the SVN server on the post-commit hook.