Pull down files and start versioning with P4V

An introduction to the most common operations you can do with P4V:

Get the latest version from the Depot

Important

At the start of each work session, begin by getting the latest versions of folders (or files) from the server's depot. Otherwise changes you make might conflict with changes that your team members have already made.

  1. On the Workspace tab, click a folder (or file) within your workspace.

  2. To download the latest version of that folder (or file) from the server depot, do any of the following:

  • click Get Latest on the toolbar, or

  • right-click that folder (or file) and click Get Latest Revision, or

  • on the Actions menu, click Get Latest Revision

About the Depot tab and the Workspace tab

You can use the Depot tab of P4V to expand the view of your streams depot to show your main stream, its folder, and the files in that folder. An entry like #1/1 means that your workspace has version #1 and the depot contains only one version.

You can use the Workspace tab to see the absolute path on your local computer to the folder with the files.

Note

Before you get the latest version, you might notice that you do not yet have the latest revision. For example, #0/1 indicates that your local workspace does not yet have a file that exist in the server depot.

Similarly, #2/3 indicates that your workspace has version 2, but the depot has version 3.

Occasionally, you might want to Access a different version of a file.

Edit a file

When you use P4V, check out before you edit it.

  1. Check out a file. On the Actions menu, click Check out, or click the Checkout button in the toolbar.

  2. In the Select Pending Changelist dialog, select the box that says "Don't show this dialog again (always use default changelist)" and click OK.

    A "pending changelist" is how the server keeps track of which files you have checked out.

    Tip

    A red checkmark is a "badge" that indicates you have checked out that file.

    If the checkmark badge is blue, another member of your team has checked out that file.

  3. Right-click the file and choose Open with to choose which application will open the file. Choose your favorite editor for that type of file.

  4. Make some edits to one or more files and save the files.

  5. To get your changes onto the Helix Core server, on the Actions menu, click Submit, or click the Submit button on the toolbar.

  6. In the Submit Changelist dialog, write a changelist description that summarizes the changes you made, or why you made the changes, and click Submit. For example, you might add some images and edit an HTML page to reference those images.

    (If you do not want to submit your changes to the depot, you can right-click the file and choose Revert.)

Note

After you submit your changelist, note that the version number increments. For example, version 3 becomes version 4. However, your other team members will not have version 4 until they download the latest version from the depot to their workspace by using P4V's "get latest" command.

Rename a file or folder

You can rename a file without checking it out.

  1. Right-click the file you want to rename and choose Rename/Move.

  2. In the Rename/Move dialog, specify the new name in the New name field.

  3. Click Submit.

  4. In the Submit Changelist dialog, click Submit.

Diff file versions

You might want to compare two versions of the same text file.

  1. On the View menu, click History.

  2. On the History tab, drag and drop one version onto another version.

The two files display side-by-side with each difference highlighted.

To diff images, see Diffing images in Helix Core Visual Client (P4V) Guide.

Access a different version of a file

  1. Right-click the file and choose Get Revision.

  2. In the Get Revision dialog, specify the revision number you want, then click Get Revision.

Delete a file

  1. Make sure that the file is not checked out.

  2. Right-click the file and choose Mark for Delete, or click the Delete button in the toolbar. The file no longer appears in the Workspace tab. However, the Depot tab displays a badge that indicates the file is "open for delete":

  3. Click Submit and submit the changelist containing the file. The file no longer appears in the Depot tab.

Note

If you need to recover a file that you deleted, ask your Helix Core administrator to see How to re-add a deleted file with the same name and full integration history.