p4 have (graph)

List the commit most recently synced to the current workspace

Syntax

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

Syntax conventions

Description

Lists the current branch and the currently-synced commit for this client workspace.

Options

file ...

List revision numbers of the currently-synced files. If file name is omitted, list all files synced to this client workspace.

--graph-only

For hybrid workspacesClosed A client workspace that supports both repos of type graph (see 'Git Connector') and the classic Helix Core file revision model., limit the report to graph depots only.

g-opts

See Global options.

Examples

p4 sync
p4 have

(depot of type graph)

Suppose you p4 sync a repo, and then issue the p4 have command, the output for that repo is two lines, such as:

//graphDepot1/repo1 workspace1 b78d7fb2e8c50e refs/heads/master

which includes the repo name, the workspace name, the value of the commit SHA, and the branch name.

Note

If, in addition to the two lines, you also see "File specific revisions:",
such as:

//graphDepot1/repo1 workspace1 refs/heads/master b78d7fb2e8c50e workspace1
File specific revisions:
workspace1  readme.txt  3a16b5c563e01a
workspace1  index.html  3a16b5c563e01a
workspace1  eiffel-tower.png  f2d7b9b83a49d

the files listed after File specific revisions are NOT part of the commit on the master branch. Instead, for those files that are NOT on the master branch, we see the workspace, file name, and commit SHA. In this case, readme.txt and index.html files belong to the same commit SHA, and the file named eifel-tower.png belongs to a different commit SHA.

Possible causes that these three files are not on the master branch include:

  • disk or network issue preventing the sync of a file

  • the workspace is configured as noclobber and file specific revisions have occurred on files that been changed from read-only to write (see noclobber under p4 client Usage Notes)

Usage Notes

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

No

No

list protection and read permission

Related Commands

To copy file revisions from the depot to the client workspace

p4 sync

(classic) List files and revisions that are synced to the client workspace. p4 have