P4 - change workspace for client

2019-04-18 15:36发布

I want to change the workspace client using the p4 command line but i don't know if its possible. You can create, delete or edit workspace using the p4 workspace command, but i want to change the current workspace with a .bat method.

Exemple : p4 -c MyClient changeworkspace myNewWorkspace

If you know in first step if it's possible.

Thanks.

标签: perforce
1条回答
倾城 Initia
2楼-- · 2019-04-18 16:04

Either set the P4CLIENT environment variable to the name of the workspace you want to be your current workspace, or consistently pass that workspace name as the value of the -c flag on your p4 commands: http://www.perforce.com/perforce/doc.current/manuals/cmdref/env.P4CLIENT.html#1040647

See also these other ways to set the environment variable (many people find P4CONFIG files helpful): http://www.perforce.com/perforce/doc.current/manuals/p4guide/02_config.html#1069873

查看更多
登录 后发表回答