P4CONFIG

Description

Contains a file name without a path. The file(s) it points to are used to store other Perforce environment variables. The current working directory (returned by PWD) and its parents are searched for the file. If the file exists, then the variable settings within the file are used.

The variable settings in the file must sit alone on each line and be in the form variable=value.

Usage Notes

Used by Client?

Used by Server?

Command-Line Alternative

Can be set in P4CONFIG file?

Yes

No

None

N/A

Value if not Explicitly Set

Operating System

Value

All

If not set, this variable is not used.

Examples

A sample P4CONFIG file might contain the following lines:

P4CLIENT=joes_client
P4USER=joe
P4PORT=ssl:ida:3548

Notes

P4CONFIG makes it trivial to switch Perforce settings when switching between different projects. If you place a configuration file in each of your client workspaces and set P4CONFIG to point to that file, your Perforce settings will change to the settings in the configuration files automatically as you move from directories in one workspace to another.

Common variables to set within a P4CONFIG file include the following:

Hide partial matches
Highlight matches
0 matching pages