Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

P4 - change workspace for client

Tags:

perforce

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.

like image 699
Cb_M Avatar asked Oct 03 '11 09:10

Cb_M


People also ask

What is Perforce client workspace?

Description. A Perforce client workspace is a set of files on a user's machine that mirror a subset of the files in the depot. More precisely, it is a named mapping of depot files to workspace files.

What is workspace root in Perforce?

The workspace root, also referred to as client root. If two or more client workspaces are located on one machine, they should not share a client root directory., specifies the location on your workstation under which Helix server stores copies of depot files.

What is Helix workspace?

A Helix Server client workspace is a set of directories on your computer where you work on file revisions that are managed by Helix Server. Each workspace is given a name that identifies the client workspace to the Helix Server.

What is unload workspace?

Load the contents of a repository workspace into a local Eclipse workspace so that you can work with project contents. Unload the workspace when you no longer need local copies of the projects it contains.


1 Answers

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

like image 69
Bryan Pendleton Avatar answered Oct 19 '22 14:10

Bryan Pendleton