p4 have

List files and revisions that have been synced to the client workspace.

Note

This command behaves differently for depots of type graph. For details, see the section Examples.

Syntax

p4 [g-opts] have [file...]

Description

List those files and revisions that have been copied to the client workspace with p4 sync. If file patterns are provided, the list is limited to those files that match one of the patterns, and to those files that are mapped to the client view.

p4 have lists the files, one per line, in the format:

depot-file#revision-number - local-path

Options

g-opts

See Global Options.

Usage Notes

Can File Arguments Use Revision Specifier? Can File Arguments Use Revision Range? Minimal Access Level Required

No

No

list

Attempting to sync an open file to an earlier version

If a file is open for edit, p4 have reflects the most recent attempt at p4 sync. For example, if you open a file for edit that is at version #3, and then attempt to sync that file to an earlier version, such as #1, the sync attempt fails. This is a feature to prevent you from accidentally overwriting your work at version #3. However, p4 have optimistically assumes p4 sync succeeded and lists the file at version #1. If you submit version #3, which increments the version to #4, and run p4 have again, p4 have lists version #4.

Examples

p4 sync //depot/name/...
p4 have //depot/name

p4 sync //depot/name/...#4
p4 have //depot/name

In each of these two pairs of commands:

The first p4 have shows that the highest revision of the file has been copied to the client workspace.

The second p4 have shows that the fourth revision is the revision currently in the client workspace.

p4 sync
p4 have

(depot of type graph) - When syncing repo data, after you have issued a p4 sync command, the first line of output from a p4 have command shows the name of the repo, the workspace name, and the value of the SHA-1 commit:

//graphDepot1/repo1 workspace1 b788d7f95dedb1941b6eb2e3c50e

The second line shows the repo and branch:

//graphDepot1/repo1 refs/heads/master

Related Commands

To copy file revisions from the depot to the client workspace

p4 sync