p4 flush

Update a client workspace’s have list without actually copying any files.

Syntax

p4 [g-opts] flush [-f -L -n -q] [[FileSpec][revSpec] ...]

Description

Warning

p4 flush can cause commands to behave in unexpected ways, so use it only when the situation is appropriate. See the two Examples.

The p4 flush command performs only Step 2 of p4 sync FileSpectwo-step operation:

Step 1: The file revisions in the FileSpec are copied from the depot to the client workspace.

Step 2: The workspace’s have list (which tracks which file revisions have been synced, and is managed by the Perforce service) is updated to reflect the new client workspace contents.

Under most circumstances, this is not desirable, because a client workspace’s have list should always reflect the workspace’s true contents. However, if the workspace’s contents are already out of sync with the have list, p4 flush can sometimes be used to bring the have list in sync with the actual contents. Because p4 flush performs no actual file transfers, this command is much faster then the corresponding p4 sync.

Options

-f

Force the flush. Helix Server performs the flush even if the client workspace already has the file at the specified revision.

-L

For scripting purposes, perform the flush on a list of valid file arguments in full depot syntax with a valid revision number.

-n

Display what the results of the flush would be without actually performing the flush. This lets you make sure that the flush does what you think it will do before you do it.

-q

Quiet operation: suppress normal output messages. Messages regarding errors or exceptional conditions are not suppressed.

g-opts

See Global Options.

Usage Notes

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

Yes

Yes

read

Examples