p4 hotfiles

Edit the hotfiles mapping table for altsync client workspaces.

Syntax

p4 hotfiles
p4 hotfiles -o
p4 hotfiles -i

Syntax conventions

Description

A client workspace has the option being either altsync or noaltsync. (See Options field in p4 client.) This option applies to all the files of the client workspace.

The p4 hotfiles command offers a way to fine tune an altsync client workspace so that certain files get sync'd rather than getting placeholders. Commands, such as p4 sync, that could create placeholders with an altsync agent, do not create placeholders for the files that match the mappings created by the p4 hotfiles command.

Placeholders can make the initial sync operation much faster. However, you might want certain files to not have placeholders in the following situations:

  • Your work is focused on certain files that you want in your workspace as soon as possible when you sync.

  • Certain files are so small that placeholders provide no benefit.

Because the hotfiles are exceptions to altsync, the hotfiles can also benefit from the Delta Transfer feature described at Delta Transfer of large binary files in the Helix Core Server Administrator Guide.

The hotfiles feature requires a 2024.2 server and a 2024.2 client.

Rules for hotfiles

The hotfiles form has a single field, HotFiles:, followed by any number of lines. Each line contains a depot file path pattern, followed by an optional rule. The rule can specify a filetype, a size, or both filetype and size. Paths can be repeated for different filetypes. See the Examples.

The altsync agent can specify additional mappings that are added to the hotfiles mappings.

If the altsync agent specifies a rule with an exclusionary mapping that conflicts with a p4 hotfiles rule, the p4 hotfiles rule is overridden.

To learn more, see P4ALTSYNC and Hotfiles have no placeholder in the Helix Core Virtual File Service (P4VFS) Guide.

Limitation

To ensure p4ignore rules are obeyed on an altsync client, add p4ignore files to the hotfile spec. The default p4ignore files, p4ignore.txt and .p4ignore can be made hotfiles in the HotFiles spec. For example,

HotFiles:
//depot/p4ignore.txt
//depot/.p4ignore 
//depot/.../p4ignore.txt
//depot/.../.p4ignore

If a custom p4ignore filename is set up by using p4 set P4IGNORE=filename, use that name instead of the default names.

Form Fields

Field Name Type Description

Path:

Writable

The depot name as provided in p4 depot depotname.

Be aware of the Limitations on characters in filenames and entities.

Filetype: Writable Any valid filetype. To learn more, see File types.
Size: Writable < or > followed by numeric value in bytes, followed by an optional unit specifier, which can be K, M, G, or T.
For example, <5K means less than five kilobytes.

Options

-o

Writes the hotfiles table to standard output. The user's editor is not invoked.

-i

Reads the hotfiles table from standard input. The user's editor is not invoked.

g-opts

See Global options.

Usage notes

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

N/A

N/A

admin

Examples

HotFiles
//depot/project1/... 
//depot/project2/... text
//depot/project3/... <50K
//depot/project4/... text+C <100K
//depot/project4/... binary <1M