Checking in files

When you mark files for add or delete, check them out, integrate them, or schedule them for resolve, the files are added to changelists. Perforce changelists are lists of actions to be performed on files. The actions in the changelist are performed when you submit the changelist. Pending changelists are changelists that have yet to be submitted. Changelists are assigned unique numbers by the Perforce versioning service. In addition, a default changelist is maintained for each client workspace. If submission of the default changelist fails, the Perforce service assigns it a number.

View changelists

To display changelists, go to View > Pending changelists or View > Submitted changelists. P4V displays the Pending or Submitted tab in the right pane, which include a list view of changelists and details for selected changelists at the bottom.

To filter the displayed changelists, use the Filter expansion pane in either the Pending or Submitted tabs. You can filter by the following conditions:

  • User: searches for changelists by the user who created them. Enter a user ID or Current user.

  • Workspace: searches for changelists by the workspace used to create them. Enter a workspace name or Current workspace.

  • Files match any of the following file paths: searches for changelists that include files in any of the paths that you enter. Drag the file from the Tree pane to populate the field with its file path, or click the Construct a file path icon to open the File Path Builder.

For more information about file filters and the File Path Builder, see Searching and Filtering.

Submit changelists

You can submit a changelist by context-clicking the file name in the Tree pane or by selecting a pending changelist from the Pending tab.

To check in individual files:

  1. Context-click the files in the depot or workspace pane and choose Submit....

  2. In the Submit dialog, enter a description, select files, and (optionally) attach jobs.

  3. Click Submit.

To submit an existing changelist:

  1. Go the the Pending tab.

  2. Filter for and select the changelist by double-clicking it.

  3. In the Submit dialog, enter a description, select files, and (optionally) attach jobs.

  4. Click Submit.

To edit the description of a submitted changelist:

  1. Context-click the changelist and choose Edit Submitted Changelist.

  2. In the Submit dialog, edit the description.

    Note

    Only the submitter of a changelist can edit its description.

To move a file from one pending changelist to another:

  1. Expand the source changelist.

  2. Drag the file to the target changelist.

Reverse a changelist submission

You cannot undo a successful changelist submission, but you can reverse previously submitted changes in two ways:

  • Rollback restores a file or set of files back to a specified changelist, date or revision. Any changes made after that point in time are not retained.

  • Back out removes specific changes made at a given changelist, date or revision but allows a user to keep changes made in subsequent revisions.

You can restore individual files or, by selecting a submitted changelist, all files in the changelist. To restore files to an earlier revision:

  1. Context-click the desired file revision or submitted changelist and choose Rollback....

    P4V displays the Rollback dialog.

  2. Specify the revision and click OK.

    P4V checks out the files at the specified revision.

  3. Submit the changelist containing the files.

    The selected revisions are now the new head revisions in the depot.

To undo the effects of a single file revision or submitted changelist:

  1. Context-click the revision or submitted changelist and choose the Back Out option.

    P4V prompts you to open the files in a new changelist.

  2. Click Yes.

    The files are opened in a pending changelist and restored to the state that preceded submission of the changelist that you are backing out. P4V restores file state as follows:

    • Edited files: P4V restores the revision that precedes the one created when the changelist was submitted.

    • Deleted files: P4V restores the revision preceding deletion.

    • Added files: P4V deletes files that were added by the changelist.

  3. To update the files with subsequent changes, resolve the files and merge in the desired changes.

  4. Submit the changelist.

Restrict access to a changelist

By default, all users can view a pending or submitted changelist, regardless of whether they are permitted access to the files in the changelist by the protections table. To restrict who can see a changelist, check the Restrict Access to Changelist option when editing a pending or submitted changelist.

Visibility of restricted changelists is as follows:

  • Pending changelists: visible only to owner, regardless of whether other users have access to checked-out files.

  • Pending changelists containing shelved files: visible to users who have access to one or more of the shelved files.

  • Submitted changelists: visible to users who have access to one or more of the files that were submitted in the changelist.

Configure changelist display

To minimize the time it takes P4V to handle very large changelists, limit the number of files displayed in a changelist by doing the following:

  1. Go to P4V > Preferences (Mac) or Edit > Preferences (Windows).

  2. Click Server Data.

  3. In the Maximum number of files displayed per changelist field, enter the number of files to display in a changelist.

You can still submit changelists with more than the specified number of files, but the file lists are displayed as follows:

  • Pending and Submitted tabs display "There are ### files in this changelist."

  • Details tab displays the list of files in a simple text box (with no P4V file badges).