Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Documentation | 2025.1

# Static labels

You can use static labels to archive the state of your client workspace (meaning the currently synced file revisions) by issuing the `p4 labelsync` command. The label you specify must have the same view as your client workspace.

For example, to record the configuration of your current client workspace using the existing `ws_config` label, use the following command:

    p4 labelsync -l ws_config

All file revisions that are synced to your current workspace and visible through both the workspace view and the label view (if any) are tagged with the `ws_config` label. Files that were previously tagged with `ws_config`, then subsequently removed from your workspace (`p4 sync #none`), are untagged.

To sync the files tagged by the `ws_config` label (thereby recreating the workspace configuration):

    p4 sync @ws_config

You can control how static labels are stored using the `autoreload` or `noautoreload` options:

- autoreload stores the labels in the unload depot. This storage option can improve performance on sites that make heavy use of labels.
- noautoreload stores the labels in the `db.label` table.

These storage options do not affect automatic labels.

p4 tag allows you to specify any revision of any file, and add that revision to an existing label or create a new label if the label does not exist.

p4 labelsync allows you to use the named label to tag the current contents of the client.

When syncing static labels, the performance is the same regardless of how they are created.

Your search for returned results