Perforce p4 command line is not using same client as the one used in p4v

Stan picture Stan · Mar 27, 2012 · Viewed 8.1k times · Source

OS: Windows 7 64-bit

P4V 2011.1 version + P4 command line client comes with P4V

I've created a client on my "D:\Perforce\Client1 directory" with P4V and synced all files. When using p4 command line tool to check the same directory (using command: p4 client or p4 opened). It seems p4 is using a client named < my computer name >, not the client I created via p4v. I also verified this again by right click on the directory in Explorer and go to "Perforce > Connection Info" in the context menu. The client name shows < my computer name >, not "Client1".

Is there any way to make p4 having the same setting that p4v has.

Answer

Bryan Pendleton picture Bryan Pendleton · Mar 27, 2012

The p4 command line is sensitive to client settings that are stored using the 'p4 set' command, or in a P4CONFIG file; the P4V tool stores connection information in P4V preferences files. To get them to use the same settings, you need to run the appropriate 'p4 set' commands to set P4CLIENT, etc. http://www.perforce.com/perforce/doc.current/manuals/cmdref/set.html

UPDATE: The documentation URLs seem to have changed again, try: https://www.perforce.com/perforce/doc.current/manuals/cmdref/Content/CmdRef/p4_set.html