p4 flush

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

Syntax

p4 [g-opts] flush [-f -L -n -q] [file[revRange] ...]

Description

Warning

Using p4 flush incorrectly can be dangerous.

If you use p4 flush incorrectly, the versioning service’s metadata will not reflect the actual state of your client workspace, and subsequent Helix Core commands will not operate on the files you expect! Do not use p4 flush until you fully understand its purpose. It is rarely necessary to use p4 flush.

The p4 flush command performs half the work of a p4 sync. Running p4 sync filespec has two effects:

p4 flush performs only the second of these steps. 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.

Use p4 flush only when you need to update the have list to match the actual state of the client workspace. The Examples subsection describes two such situations.

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 the results of the flush 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