Your Perforce client spec defines your workspace location, the depot files you plan to work with, and where they will be located in your workspace when you invoke Perforce commands.
To edit a client spec:
Client spec field descriptions
A client spec contains the following fields:
|Client||The unique name of your current client workspace (this cannot be changed).|
|Update||Shows when your client spec was last changed.|
|Access||Shows when your workspace was last used.|
|Owner||The user who "owns" the workspace and the client spec. (Unless the client spec is locked, ownership has no particular privilege.)|
|Host||The name of the workstation or computer on which your workspace is located. P4Web uses this value to prevent you from accidentally using your workspace from the wrong machine. If your workspace is on a shared filesystem, and you want to use it from more than one machine, leave the host value blank.|
|Description||Optional information that can be used to described what this client workspace is used for.|
|Root||The location of the the root of your workspace on the local
filesystem. You should set this once, when you are first creating your client
spec. Use the directory naming syntax recognized by your machine (for example,
"C:\WS" on Windows, or "/usr/team/bill/ws" on Unix).
If you ever want to change your workspace root, you should first submit your opened files, then remove all Perforce-managed files from your workspace, and then use the Edit Client page to change the root. After saving the new client spec, sync your workspace and files will be written to the new location.
|Altroots||You can enter up to two optional alternate client workspace roots. The first of any of these roots (main or alternate) that matches P4Web's current working directory is used; if none matches, the main root is used.|
|Options||Controls some optional characteristics of how Perforce operates in this client workspaces. See Client Workspace Options, below.|
|LineEnd||Controls how line endings in text files are translated when files are transmitted between the depot and your workspace. See Translating Line-end Characters, below.|
|View||Describes how depot files will be "mapped" into your workspace.
For example, if your client workspace name is "PatWS" and its root is "C:\WS",
//depot/projects/saturn/... //PatWS/SAT/...will map all the files the //depot/projects/saturn path to a matching directory hierarchy under "C:\WS\SAT".
If you're creating your first workspace, you can leave the default values provided in the View field. Be aware, however, that if your Perforce server manages very large depots, the default view can cause your workspace commands to run slowly. For better performance, define a view that maps to only the depot paths you are interested in working with.
See the P4 User's Guide for more details on client view mapping.
These optional behaviors can be defined for your client workspace:
|Unopened files writable on client: (allwrite)||Will all files be writable in the workspace, or only files that have been opened for edit? The default value is (allwrite), so that only files you've opened will be writable.|
|Data compression between client/server: (compress)||Will data sent between your client workspace and the Perforce server be compressed? The default value is off. Over a LAN or high-bandwidth connection, there's little benefit to compressing this data, but if you're operating over a slow link, turning this option on will help.|
|Mod time set to depot submission time: (modtime)||
What should the modification time on files in your workspace be set to when copied in by the sync command?
By default, the modification time of unopened files on your workspace files shows when they were synced. Choosing this option will cause sync to set each file's modification time to the timestamp associated with it when it was submitted to the depot.
|Client spec write-protected: (locked)||
Lock the client spec?
The default value is off (unlocked). Anyone can use the workspace or edit the client spec. If you turn this on, only the user shown in the Owner field will be able to use the workspace or edit the specification.
|Sync deletes empty client directories: (rmdir)||
Should a sync command that deletes all files in a directory also delete the directory?
The default value is off. A sync command that removes all files in a directory will leave empty directories. If you turn this option on, empty directories will be removed.
|Sync overwrites writable unopened files: (clobber)||
Should the sync command overwrite any writable, unopened files?
The default value is off. If you turn this option on, any writable, unopened files in your workspace can be overwritten when you run sync. This includes files made writable either either from using the allwrite option described above, or by manually changing permissions from within your local operating system.
Text files contain special characters that indicate where line endings occur. Different operating systems use different characters (usually CR and/or LF). When Perforce copies files from the depot into your workspace, it translates line endings as appropriate for your workspace machine. When it sends file content from your workspace to the depot, it translates them back.
The "LineEnd" field in the client spec lets you control the line-end characters Perforce uses when it reads and writes text files in your workspace. Choices are:
|local||Use whatever line endings the local operating system uses. This is the default, and the preferred setting for client workspaces that are not shared.|
|unix||Use UNIX-style line endings, LF.|
|mac||Use Macintosh-style line endings, CR.|
|win||Use Windows-style line-endings, CRLF.|
|share||Write files using UNIX-style line endings, but read files with either UNIX- or Windows-style line endings.|
Note: Changing the "LineEnd" setting in your client spec doesn't affect the files Perforce has already put in your workspace. You must re-sync your files using the "force" option to make Perforce rewrite the files with the new line-end characters.