Perforce Command Reference:   [Index] [Prev] [Next]


p4 client

Synopsis

Create or edit a client workspace specification and its view

Syntax

p4 [g-opts] client [-f -t template] [clientname]
p4 [g-opts] client -o [-t template] [clientname]
p4 [g-opts] client -d [-f] clientname
p4 [g-opts] client -i [-f]

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. This command is used to create or edit a client workspace specification; invoking this command displays a form in which the user enters the information required by Perforce to maintain the client workspace.

Although there is always a one-to-one mapping between a client workspace file and a depot file, these files need not be stored at the same relative locations, nor must they have the same names. The client view, which is specified in the p4 client forms View: field, specifies how files in the client workspace are mapped to the depot, and vice-versa.

When called without a clientname argument, p4 client will operate on the client workspace specified by the P4CLIENT environment variable or its equivalents. When called with a clientname argument, the client specification is displayed read-only.

When p4 client completes, the new or altered client workspace specification is stored within the Perforce database; the files in the client workspace are not touched. The new client view doesn't take effect until the next p4 sync.

Form Fields

Field Name Type Description
Client: Read-only The client workspace name, as specified in the P4CLIENT environment variable or its equivalents.
Owner: Writable The Perforce user name of the user who owns the client workspace. The default is the user who created the client workspace.
Update: Read-only The date the client workspace specification was last modified.
Access: Read-only The date and time that any part of the client workspace specification was last accessed by any Perforce command.
Description: Writable, optional A textual description of the client workspace. The default text is Created by owner.
Root: Writable The directory on the local host from which all the files in the View: are specified relative to.
Options: Writable A set of six switches that control particular client options. See the Usage Notes, below, for the listing of these options.
View: Writable, multi-line Specifies the mappings between files in the depot and files in the client workspace. See Using Views for more information.

Options

-t template Copy client workspace template's view into the View: field of this client workspace.
-f Allows the last modification date, which is normally read-only, to be set. Can also be used by Perforce superusers to delete or modify clients that they don't own.
-d [-f] clientname Delete the specified client workspace, if the client is owned by the invoking user and it is unlocked. The -f flag allows Perforce superusers to delete client workspaces that they don't own.
-i Read the client description from standard input.
-o Write the client specification to standard output.
g_opts See global options section.

Usage Notes

Can File Arg Use
Revision Specifier?
Can File Arg
Use Revision Range?
Minimal
Access Level Required
<NA> <NA> list

Examples

p4 client Edit or create the client workspace specification named by the value of P4CLIENT or its equivalents.
p4 client -t sue joe Create or edit client workspace joe, opening the form with the field values in client workspace sue as defaults.
p4 client -d release1 Delete the client workspace release1.

Related Commands

To list client workspaces known to the system p4 clients
To read files from the depot into the client workspace p4 sync
To open new files in the client workspace for addition to the depot p4 add
To open files in the client workspace for edit p4 edit
To open files in the client workspace for deletion p4 delete
To write changes in client workspace files to the depot p4 submit



Perforce Command Reference:   [Index] [Prev] [Next]


Copyright 1999 Perforce Software.
Contact us at [email protected]
Last updated: 09/15/99 (Manual version 99.1.cr.6)