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.
Right-click a file (or click the ellipses (...)) to open the More Options menu. Click Lock. Choose a duration for the lock. If you choose unlimited, the file will be locked until you unlock it manually.
Name. svn lock — Lock working copy paths or URLs in the repository so that no other user can commit changes to them.
You can add the property or auto-prop svn:needs-lock which makes the file read-only and requires you to place a lock on the file to edit it. If you are using TortoiseSVN you will see a different icon for locked files, this should be easy for a second user to see and know not to edit the file.
To release a lock manually, select the file(s) in your working copy for which you want to release the lock, then select the command TortoiseSVN → Release Lock There is nothing further to enter so TortoiseSVN will contact the repository and release the locks.
Two steps:
links:
More specifically, if you have TortoiseSVN installed,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With