Displaying File Status and History

You can display the following types of information about files:

You can also search the contents of files under Perforce control using a grep-style search.

File Status

To view the status of open files, examine the file icons in the P4 Pending Changelist view. The label decorations displayed on the icons indicate the status of the file. For example, the following figure shows files open for delete (red x), edit (red check mark), and add (red +).

File Properties

To display file properties:

  1. Right-click the file in the Navigator view and choose Properties.
  2. Click Perforce. File properties are displayed as shown in the following figure.

Note that the head revision is the revision most recently checked in, and the have revision is the one last synced to your workspace.

Revision History

To display the revision history of a file, right-click the file and choose Revision History.

The History view lists the following details about the revisions of a file that have been submitted to the Perforce depot:

To compare two revisions to see what changes have been made, select the desired revisions, then right-click and choose Diff Two Revisions. The Diff Two Revisions dialog is displayed, highlighting the differences between the files, as shown in the following figure.

Submitted Changelists

To display a list of previously-submitted changelists, click the P4 Submit tab. To display details for a submitted changelist, click the desired changelist. Details are displayed in the pane below the list.

Searching File Content

To search the contents of files in a Perforce depot:

  1. Click the toolbar Search button. The Search dialog is displayed.
  2. Click the P4 Grep tab.
  3. Specify the text you are seeking, the files to be searched, and any search options.
  4. Click Search. Results are displayed in a Search results tab.
  5. To display the contents of file that contains the search text, double-click it in the Search pane. To locate an instance of the search text in the file, expand the results for the file and double-click the line that displays details about the instance.
You can also search file text from the P4 Submit view.

Copyright Perforce Software 2003-2017. All Rights Reserved.