Force user to lock file in SVN before editing
28,205
Solution 1
Two steps:
- put the svn:needs-lock property on those files. That way they are check out read-only
- when such a file must be modified, use the svn lock command and commit as usual
links:
- http://svnbook.red-bean.com/nightly/en/svn.advanced.locking.html
- http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-locking.html
Solution 2
More specifically, if you have TortoiseSVN installed,
- Right-click the file in Windows Explorer, select TortoiseSVN->Properties
- Click New->NeedsLock
- Choose Locking required in the dialog:
- Click OK
- Commit the file
- Done!
Author by
Zooking
Sitecore developer with lots of different CMS-experience.
Updated on July 18, 2022Comments
-
Zooking almost 2 years
We have some files in our project that can't be merged and hence the files must be locked by the users before editing them. Is there a way to force the user to lock a file before editing?
We are using Subversion and TortoiseSVN / VisualSVN.