p4 client (graph)
Create or edit a client workspace specification
The command p4
workspace
is an alias for p4
client
.
Syntax
p4 [g-opts] client [-f] [-t template] -T graph [graphClientName] p4 [g-opts] client -o [-f] [-t template] -T graph [graphClientName]
Description
To modify Graph Depot files using p4 commands, your workspace must obey several additional rules, beyond those described in p4 client:
- Specify Type: graph
- Specify
View: map
, where map describes the files in the repos that are to be used by this client
Hybrid client that maps to both classic and graph depots
You can create a client spec that maps solely to a classic depot, solely to a graph depot, or to a hybrid client A client workspace that supports both repos of type graph (see 'Git Connector') and the classic Helix Core file revision model. that combines both.
If you create a hybrid client
, the options are:
- a client of a classic depot in which graph depot files are read-only and classic files are editable - see classic client spec that includes a mapping to a graph directory
- a client of a graph depot in which classic files are read-only and graph depot files are editable - see graph depot client spec that includes a mapping to a classic directory
- a read-only client in which both classic and graph depot files are read-only
For more information about depots of type graph
, see:
- Including Graph Depot repos in your client
in
p4 client
- Working with depots of type graph
in
p4 depot
- Stream and graph depot - .git suffix and repo path in p4 stream
Options
|
Allows the last modification date, which is normally read-only,
to be set. Administrators can use the Use of this option requires |
|
Write the client workspace specification to standard output. |
|
By default, clients are
|
|
See Global options. |
Usage notes
-
there is no distinct graph version of the client command, but the client spec has a
Type
field that can be set tograph
-
to map a graph depot path (depot or repo), the user must have at least
read
permission on that graph path (either the individual repo, or the whole depot)
Examples
classic client spec that includes a mapping to a graph directory
This client spec associated with a graph depot spec does not include a line that specifies "Type: graph
", so updates to Graph Depot paths are prohibited.
Client: mixed_client1 Update: 2017/04/04 09:51:30 Access: 2017/04/04 09:51:48 Owner: bruno Host: laptop153 Description: Created by bruno for a writable "classic" depot with read-only access to a graph depot. Root: /home/user/mixed_client1 Options: noallwrite noclobber nocompress unlocked nomodtime normdir SubmitOptions: submitunchanged LineEnd: local View: //depot/main/projectA/... //mixed_client1/depot/main/projectA/... //repo/projectB/... //mixed_client1/repo/projectB/...
depot is the default name for a writable "classic" depot.
repo is the default name for a depot of
type graph
.
This client spec provides write access to projectA
, which
belongs to a writable "classic" depot, and read-only access to
projectB
, which belongs to a depot of type
graph
. One use case for such a client is to support
including files from both kinds of projects into a single software
build.
With this client spec, p4 sync
results in:
//depot/main/projectA/projA.txt#1 - added as /home/user/mixed_client1/depot/main/projectA/projA.txt //depot/main/projectA/readme.txt#1 - added as /home/user/mixed_client1/depot/main/projectA/readme.txt //repo/projectB/projB.txt - added as /home/user/mixed_client1/repo/projectB/projB.txt //repo/projectB/readme.txt - added as /home/user/mixed_client1/repo/projectB/readme.txt
If this client attempts to edit a file in a graph depot, an error message appears. For example,
p4 edit aRepoFile.c //repo/projectB/aRepoFile.c - can only edit file in a local depot
graph depot client spec that includes a mapping to a classic directory
The client spec associated with a graph depot spec MUST include a line that specifies "Type: graph
".
Client: mixed_client2 Update: 2018/05/16 19:01:30 Access: 2018/05/16 19:01:59 Owner: bruno Host: laptop153 Description: Created by bruno for a writable graph depot, with read-only access to a classic depot. Root: /home/user/mixed_client2 Options: noallwrite noclobber nocompress unlocked nomodtime normdir SubmitOptions: submitunchanged LineEnd: local Type: graph View: //repo/projectB/... //mixed_client2/repo/projectB/... //depot/main/projectA/... //mixed_client2/depot/main/classicProjectA/...
If this client attempts to edit a file in a classic depot, an error message appears. For example,
p4 edit aClassicFile.c aClassicFile.c - no such file(s).