Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 Server Administration Documentation | 2025.1

# Set up client workspaces

A client workspace is a set of directories on a user’s machine that mirrors a subset of the files in the depot. More precisely, it is a named mapping of depot files to workspace files. The workspace view defines which depots you can sync to your client workspace.

A view consists of mappings, one per line. The left-hand side of the mapping specifies the depot files and the right-hand side the location in the workspace where the depot files reside when they are retrieved from the depot.

When you create a client workspace, a classic depot is mapped to your workspace by default. However, a depot of type graph requires that you manually configure the mapping by editing the `view` field in the client workspace specification. You can also edit the spec to view only a portion of a depot or to change the correspondence between depot and workspace locations.

In the following example, a graph depot called `graphDepot` includes a repository called `repo1`. It is mapped to a dedicated folder called `workspace` such that all files located in the `//graphDepot/repo1` directory on the P4 Server appear in the `//workspace/graphDepot/repo1` directory on the machine where the client workspace resides.

    //graphDepot/repo1/... //workspace/graphDepot/repo1/...

For advanced workflows, you could also have a mixed workspace to accommodate the mapping of both a classic depot and a graph depot. In this case, your mapping could look like this:

    //graphDepot/repo1/... //mixed-client/graphDepot/repo1...
    //depot1/moduleA/... //mixed-client/depot1/moduleA/...

1. To create a depot client specification and its view, run the following command:

       $ p4 client clientName

2. Edit the workspace view to meet your requirements. For details and examples, see the graph depot version of p4 client (graph) in the P4 CLI Reference, which is different from the classic p4 client command.

Your search for returned results