What is the command-line equivalent of ‘Switch Port Client User’ as found in the p4win gui client?
I am already logged under one port but now I am attempting to connect to a different port on the same server in order to access a separate source control file depot. I assume it would involve using:
p4 login
However, reading the ‘help’ for ‘login’ does not show an option to specify the port #. Both user name and client name would remain the same but just need to change the port #.
The P4PORT configuration variable stores the Perforce server name and port number to connect to. You can set this value as an environment variable or, if you’re using Windows, in the registry using ‘p4 set’:
To see what the current value of P4PORT is: