Configuration parameter precedence
Configuration parameters for P4D, P4 and P4V can be set in different ways. The following precedence applies, where 1 overrides 2, 2 overrides 3, and so on:
- For
P4 Server
applications or a
P4 Server
(
p4d), command-line flags, but these are not a persistent configuration. - For a
P4 Server (
p4d), persistent configurables set byp4 configureor within the DistributedConfig form field of the p4 server spec. - The
P4CONFIGfile, ifP4CONFIGis set. - User environment variables. See P4ENVIRO.
- System environment variables.
- Windows user registry or macOS user preferences set by
p4 set. - Windows system registry or macOS system preferences (set by
p4 set -s).
When a
Perforce
service (p4s) starts up, it reads its configuration
parameters from the environment according to the following
precedence:
- Persistent configurables set by
p4 configureor within the DistributedConfig form field of the p4 server spec. - Windows service parameters set by
p4 set -Sservicename - System environment variables.
- Windows system registry or macOS user preferences (set by
p4 set -s).
User environment variables can be set with any of the following:
- Linux
export, Windows command promptset - The
AUTOEXEC.BATfile - Windows User Variables tab under the System Properties dialog box in Control Panel
System environment variables can be set with:
- Linux
export, Windows System Variables tab under the System Properties dialog box in the Control Panel.
The output of p4 set lists the value of each variable and how each variable was set, such as by config, enviro, set, or set -s