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.

Right-click the file or folder you want to lock, click on RabbitVCS SVN and then Get Lock...

The new window looks almost exactly like the checkout window and is used in the same basic way.

Write a message explaining why you are locking the file. This message can be retrieved by others if they have been trying to modify the locked file.

You can, if so desired, steal the lock from whomever has it currently. This is ill-advised, as the locks are meant to strictly control access, not loosely inform who is working on a file. Only one good reason exists for stealing a lock. This is when the original lockholder cannot be found or the locking repository has been lost.

Click OK when you have finished configuring the lock.

You may be requested to type in your credentials. This is your full AAU email address and itspassword.

Optionally, you can save these credentials for later use, saving time during SVN operations.

If the file has already been locked by someone else, an error like the one below will be displayed.

Either wait for the file to be unlocked or steal the lock instead, if you need to modify the file.


Unlocking, or releasing, a lock can happen in one of three ways.

  1. Stolen - if someone else stole your lock in their own locking operation, your lock is implicitly released.
  2. Committed - when you commit the locked file's changes, it is automatically released.
  3. Manually - you can manually release a lock if you so desire.

Releasing a lock yourself is accomplished by right-clicking the locked file or folder, clicking onRabbitVCS SVN and finally Release Lock...