AAU It Services


Locking files in Subversion

Locking is a powerful concept in Subversion, allowing single users to gain exclusive access to modifying a file in the repository. Once locked, other users will be unable to commit changes to that file until it has been unlocked. This allows you a strong concept of task and file ownership during your project, aiding division of labour. Even more so, the locking mechanism is very useful in the reduction of conflicts.

To lock a file, right-click it, go to TortoiseSVN and click Get Lock... (if you want to unlock, click Release Lock... instead).

Select the files you wish to lock (be sure to leave the rest unchecked) and type amessage for the log (so others can see why you locked the files). Optionally, click Steal the locks to force the locks to be given to you. Be careful with this, as others with active locks will simply lose them without notice. Finally, click OK to get the locks.