在p4win gui客户端中,什么命令行相当于"Switch Port client User“?
我已经在一个端口下登录,但现在我正在尝试连接到同一服务器上的另一个端口,以便访问单独的源代码控制文件库。我假设它会涉及到使用:
p4 login但是,读取“login”的“help”不会显示指定端口号的选项。用户名和客户端名称将保持不变,但只需更改端口号即可。
发布于 2008-11-26 22:07:07
P4PORT配置变量存储要连接的Perforce服务器名称和端口号。您可以将此值设置为环境变量,或者,如果您使用的是Windows,则可以使用'p4 set‘在注册表中设置此值:
p4 set P4PORT=perforce:1669要查看P4PORT的当前值,请执行以下操作:
> p4 set P4PORT
P4PORT=perforce:1669发布于 2008-12-01 13:21:22
如果你想对任何P4命令通用地这样做,那么可以通过"p4帮助用法“找到一般形式。
简而言之,
p4 -p <your port> login 会按你的要求去做。请注意,在用法帮助中,您可以从命令行指定大多数内容,例如客户端规范、用户名、密码等。
发布于 2008-11-26 22:22:22
例如:
p4 set P4PORT=1666从帮助中:
C:\> p4 help environment
Environment variables used by Perforce:
Variable Defines For more information see
-------- ------- ------------------------
P4AUDIT name of server audit file p4d -h
P4CHARSET client's local character set p4 help charset
P4COMMANDCHARSET client's local character set for
command line operations p4 help charset
P4CLIENT name of client workspace p4 help client
p4 help usage
P4CONFIG name of configuration file Command Reference Manual
P4DIFF diff program to use on client p4 help diff
P4DIFFUNICODE diff program to use on client p4 help diff
P4EDITOR editor invoked by p4 commands p4 help change, etc
P4HOST name of host computer p4 help client
p4 help usage
P4JOURNAL name of server journal file p4d -h
P4LANGUAGE language for text messages p4 help usage
P4LOG name of server log file p4d -h
P4MERGE merge program to use on client p4 help resolve
P4MERGEUNICODE merge program to use on client p4 help resolve
P4PAGER pager for 'p4 resolve' output p4 help resolve
P4PASSWD user password passed to server p4 help passwd
P4PORT port client connects to p4 help info
or server listens on p4d -h
P4ROOT server root directory p4d -h
P4TARGET target server for proxy Command Reference Manual
P4TICKETS location of tickets file Command Reference Manual
P4USER user name p4 help usage
PWD current working directory p4 help usage
TMP, TEMP directory for temporary files Command Reference Manual
See 'p4 help set' for details specific to Windows. The syntax for
setting an environment variable depends on the OS/shell. Note that many
shells allow the setting of shell variables separate from environment
variables - Perforce cannot see the shell variable, only the environment
variable.
If you are a typical user then the only variables of interest are
$P4CLIENT, $P4PORT and $P4PASSWD.
C:\> p4 help set
set -- Set variables in the registry (Windows only)
p4 set [ -s -S service ] [ var=[value] ]
'p4 set' sets the registry variables used by Perforce on Windows
platforms. Normally, the variable 'var' is set to 'value'.
If 'value' is missing, the variable 'var' is unset. Without
any arguments at all, 'p4 set' list variable settings.
The -s flag causes 'p4 set' to set variables for the whole system
rather than for the user. You must have NT administrator powers
to use this.
The -S service flag causes 'p4 set' to set variables for the named
service. You must have NT administrator powers to use this.
Currently, registry variable entries may be overridden by environment
variables and (in some cases) flags on the command line.
See 'p4 help environment' for a list of environment/registry variables.https://stackoverflow.com/questions/322294
复制相似问题