Lock

This function is initiated via the Team > Lock menu option.

Overview

This function enables you to lock one or more files for editing. This is useful for ensuring that team members do not waste each others' time by editing the same resource if it is hard or perhaps impossible to merge these changes (for instance with binary files).

Process

To lock specific resources, select the file or files you wish to lock, and choose Lock from the Team menu. This will bring up the Lock dialog where you can enter a comment to associate with the lock.

If you commit a change to a locked file, the lock is usually released. To persist the lock beyond the commit, you need to check the Keep locks option in the commit dialog.

If a different user has locked a file and you need to take control of the resource, SVN makes it possible to steal the lock. This is accomplished by checking the Steal Lock option on the Lock dialog.

Locked resources are identifed by the tick mark decorator.

If you want to ensure that a specific file is always locked before committing, you can set the SVN property svn:needs-lock on the file (and commit). This ensures that a lock must be taken before committing it.