Reconfigure a client workspace
You can reconfigure your client workspace if you want your files to be mapped to a different location on the local disk, or if the computer or host name of the workstation has changed.
Prerequisites
-
If you want to change the root directory of your workspace, ensure that the new directory exists on your computer.
-
If you are going to change the computer host name of the workspace, run the p4 info command and record the Client host: field value so you can enter it when you edit the client workspace spec.
Change the location of workspace files
-
Ensure that you have no files checked out by running p4 submit or p4 revert on any open files.
-
Remove the files from their old location in the workspace by running the p4 sync command in the correct way to delete local files:
p4 sync ...#none
-
Make the changes:
When referencing a classic depot A repository of P4 files that is not streams-based. Uses the Perforce file revision model, not the graph model. The default depot name is depot. See also 'stream depot' and 'graph depot'., run the p4 client command to open the client workspace spec, then edit the Host:, Root:, and\or View: fields, then save the spec, and close the spec.
Consult with an administrator before making changes to a stream spec because other users of that stream will be affected. The file locations under the the client’s Root: directory are automatically determined by the stream specification’s PATHS: field. Modification of some of the path types defined in this field can change the location of files on all client workspaces associated with that stream. To learn more, see Update streams.-
If you want to change the Host: and\or Root: fields, run the p4 client command to open the workspace spec, make the edits, then save the spec, and close the spec.
-
If you want to change the Path: field, run the p4 stream command to open the stream spec, then edit the Path: field, then save the spec, and close the spec.
-
-
Run p4 sync to copy the files from the depot to the new locations.