Defining a Workspace View

The workspace view determines which portions of the depot are visible in your Workspace Tree and where local copies of depot files are stored in your workspace. If you use streams, the workspace view is generated and updated automatically. If you use classic depots, you must maintain the view manually, as described in this topic.

To define or change your workspace view:

  1. Go to View>Workspaces or click the Workspaces Workspaces icon in the toolbar.
  2. In the Workspaces tab, context-click the workspace and select Edit displayed.
  3. In the Workspace form, edit the Workspace Mappings field. You can define the view syntactically and graphically, as described below.
  4. When you have finished editing, save your changes.

Syntactic view specification

Click the View workspace mapping as text icon and type your view specification using Perforce client view syntax. Views consist of mappings, one per line. The left-hand side of the mapping specifies the depot files and the right-hand side specifies the location in the workspace where the depot files reside when they are retrieved from the depot. Example:

//depot/...         //bruno/depot/...
//user_depot/...    //bruno/user_depot/...
//projects/...      //bruno/myprojects/...

For details about client view syntax, refer to the P4 User's Guide.

Graphical view specification

Click the View workspace mapping as tree icon. The depot is displayed as a tree of folders and files. Context-click the file or folder you want to map and choose the desired mapping, as follows:

Alternately, double-click files or folders and use the resulting Special Edit dialog to define the view. This dialog enables you to specify options by clicking radio buttons or using the Expressions field to enter the left and right-hand components of a client view mapping.

Tip: To quickly add a depot path to the client view, go to View>Filter Depot>Entire Depot Tree, context-click the desired path and choose Map to Workspace View...