Set Perforce system variables.
p4 [g-opts] set [-q] [-s] [-S svcname] [var=[value]]
Both
Perforce
client applications and the shared versioning service make use of certain
system variables. Depending on the operating system and other factors,
variable definitions may be stored in the file defined by
P4CONFIG
, in the file defined by P4ENVIRO
, or
in the Windows registry.
p4 set
are stored
in the P4ENVIRO
file.On Windows, values defined with p4 set
are
stored in the P4ENVIRO
file if this is set. If it is not
set, they are stored in the Windows registry.
Windows administrators running
Perforce
as a service can set environment variables used by the service with
p4 set -S svcnamevar=value
.
These variables are always stored in the Windows registry.
To change a variable setting that applies to the current user, use
p4 set var=value
. Administrators
can use p4 set -s var=value
to set
the variable’s default values for all users on the machine.
For more information, see P4ENVIRO.
To unset the value for a particular variable, leave
value
empty.
To view a list of the values of all
Perforce
variables, use p4 set
without any arguments. If a P4CONFIG
file was used to set the
variable, its location is displayed.
p4 set
(for the current user) or p4 set
-s
(for the local machine).Note how the source of the variable definition is shown in this sample
output to the p4 set
command. If no source is given,
the value is stored in the variable itself rather than in a file
containing the definition.
P4CLIENT=symlinks-nix (config) P4CONFIG=p4config.txt (config '/home/perforce/p4clients/symlinks-nix/p4config.txt') P4EDITOR=/usr/bin/vi P4IGNORE=p4ignore.txt (enviro) P4PORT=win-jbrown:20151 (config) P4USER=jbrown (config) P4_20151_CHARSET=none (enviro)
Please refer to your shell manual for information on setting variables.
|
Reduce the output. When listing files, don’t display the origin of the setting. The output is suitable for parsing with scripts. |
|
Set the value of the registry variable for the local machine. On Windows, without this option, The location is reflected in the output of |
|
Set the value of the registry variables as used by service
|
|
See Global Options. |
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
N/A |
N/A |
|
P4JOURNAL
for a
Perforce
Windows service must be present at the machine running the
service.On Windows, variables have the following precedence:
P4CONFIG
files have precedence over both of these;p4 configure
override all environment variables, including registry entries set
with p4 set -S
;p4
set
. (In these cases, the
Perforce
Command-Line Client behaves just as though it were in a UNIX
environment.)
|
On all platforms, display a list of Perforce variables and their origins without changing their values. |
|
On all platforms, display a list of Perforce variables in a format suitable for scripts to parse without changing their values. |
|
On Windows or OS X, unset the value of |
|
On Windows, set a variable telling
Perforce
applications to connect to a
Perforce
service at host The variable is set only for the current local user. |
|
Set You must have administrative privileges to do this. |
|
For the Windows service You must have administrative privileges to do this. |
|
On Windows, for the current local user, set the path for the default text editor. The presence of spaces in the path to the editor’s executable requires that the path be enclosed in quotation marks. |