Shelving Files

Shelving enables you to store copies of open files temporarily in the Perforce server without checking them in. Shelving is useful for a variety of purposes, including taking and restoring snapshots of in-progress work and reviewing other users' code before it's checked in. When you shelve a file, a copy is placed in a pending changelist from which other users can unshelve it. Pending changelists that contain shelved files are displayed as follows: shelved changelist badge. When the changelist is expanded, it contains a node listing shelved files. When you expand the Shelved Files node, shelved files are indicated as follows: shelved file. The decoration on the file indicates the action for which it was opened before being shelved.

When managing shelved files, note the following:

To shelve checked-out files in a pending changelist:

  1. In the P4 Pending Changelists view, right-click the changelist and choose Shelve... P4Eclipse displays the Shelve dialog.
  2. Check the files you want to shelve and click Shelve. P4Eclipse shelves the file in the selected changelist (or, if you are shelving files in the default changelist, creates a new changelist).

Unshelving Files

After shelving a file, you (or another user) can unshelve it, which restores the shelved copy to your workspace and opens it in the changelist of your choice. Unshelving does not remove files from the shelf. To unshelve a file that was shelved by another user, you must have permission to check out the file. When you unshelve a file that was shelved by another user, it is copied to one of your changelists, from which you can edit and submit the file. To replace a file with its shelved version, right-click the file and choose Replace with Shelved Version...

To unshelve files too a specified pending changelist:

  1. Right-click the shelved file or the Shelved Files node and choose Unshelve... P4Eclipse displays the Unshelve dialog.
  2. Check the files you want to unshelve and specify the changelist in which you want them unshelved.
  3. Check any desired options, then click OK. The shelved file is copied to your workspace and opened in the specified changelist.

Shelved files remain shelved until you delete them from the pending changelist. To delete a shelved file from a pending changelist, right-click the shelved file and choose Delete Shelved Files.

Submit a Changelist Containing only Shelved Files

You can submit a changelist which has shelved files if they are mapped in your client view. To do that, you need make sure that the shelved changelist is submittable, i.e., the changelist should not contain opened files, then


Copyright Perforce Software 2003-2012. All Rights Reserved.