Define a client workspace
The following procedure explains how to define a client workspace. No files are synced when you create a client specification. To find out how to sync files from the depot to your workspace, see Sync files. For details about relocating files on your computer, see Change the location and/or layout of your workspace.
Generally speaking, the client storage type cannot be changed after the client workspace is created. For example, a readonly
client cannot be changed into a writeable
client. To learn more, see Client workspace types in the Helix Core Server Administrator Guide.
To define a client workspace:
-
Specify the workspace name by setting
P4CLIENT
variable. For example, on a UNIX system:export P4CLIENT=bruno_ws
-
Issue the
p4 client
command.ImportantIf you are working in a stream depot, pass in the
S _streamname
option to thep4 client
command to specify the name of the stream to which Helix Core Server should bind the workspace. See Define a client workspace and bind it to the stream. The stream spec then defines the workspace view, so step 3 below does not apply to stream clients.Helix Core Server displays the client specification form in your text editor. (For details about Helix Core Server forms, see Using Helix Core Server forms.)
-
Specify (at least the minimum) settings and save the specification.
The minimum settings you must specify to configure a client workspace are:
-
Workspace name
The workspace name defaults to your computer’s hostname, but your computer can contain multiple workspaces. To specify the effective workspace, set
P4CLIENT
. -
Workspace root
The client workspace root is the top directory of your client workspace, where Helix Core Server stores your working copies of depot files. Be sure to set the workspace root, or you might inadvertently sync files to your computer’s root directory.
NoteFor Windows users: when specifying a workspace root, you must include the drive letter. In addition, root is null on Windows when the client workspace is either on a disjoint drive with only
c:\
as the root or is spread over multiple drives.If the workspace root directory does not exist, you must create it before the Helix Core Server application can make use of it.
The
@
,#
,*
, and%
characters have specific meaning to Helix Core Server; if you have file or folder names that use these characters, see Restrictions on filenames and identifiers for details. -
Workspace view
By default, the entire depot is mapped to your workspace. You can define a workspace view (also referred to as a client view) to determine which files in the depot are mapped to your workspace. This enables Helix Core Server to construct a one-to-one mapping between individual depot and workspace files. You can map files to have different names and locations in your workspace than they have in the depot.
For users of streams, Helix Core Server generates the workspace view from the contents of the stream spec’s
Paths
field.Users of classic Helix Core Server branches configure the workspace view by editing the contents of the client spec’s
View
field.For details on configuration of workspace views, see Configure workspace views.
-