Locking a File—Perforce Helix Core

When you are working, you may want to lock the files you have modified. Locking a file does not prevent other users from modifying the file. However, no one else can commit a file that you have locked until you unlock the file. If your project is bound to Subversion, you can steal a lock from another user if you need to commit a locked file while they are working on it. Likewise, another user can steal a lock on a file you have locked. You will see this option if your project is bound to Perforce Helix Core or Subversion. See Unlocking a File—Perforce Helix Core.

How to Lock a File

  1. In one of the window panes (e.g., Content Explorer, Source Control Explorer, File List, Project Organizer, Pending Changes window pane), select the relevant file(s).

    OR

    Open a file.

  2. Do one of the following, depending on the part of the user interface you are using:
    • Ribbon Select Source Control > Lock.

    • Right-Click If you have the Content Explorer, Project Organizer, Pending Changes window pane, or File List open, right-click the files you want to lock and select Source Control > Lock.

    • Source Control Explorer Right-click the files you want to lock and select Lock.

    The Lock dialog opens. The selected files are listed with check boxes next to them.

  3. Make sure to select the check box next to each file you want to lock so it contains a check mark.

  4. Click Lock.

Note You cannot lock files with Pending Add or Checked In status.