Step 2: Set up a typemap | Helix Core Cloud administrators
A typemap tells Helix Core Server how to handle files with specific file extensions or within specific folders. By default, Helix Core attempts to automatically detect if files should be stored as text or binary data. To handle file types differently or enable specific features, set up a typemap. For example, a typemap lets you enforce exclusive check outs so only one user can edit a file at a time, allow editing of specific file types without check out, or limit the number of versions of a file stored on the server.
Set up the typemap before your team starts versioning files with Helix Core. The typemap is only applied to files added to the server after the typemap is modified. The typemap does not change files already on the server.
-
At a command prompt, type
p4 typemap
and press Enter.The typemap opens in your default text editor.
If a p4 client error is displayed, make sure that you are using the correct P4PORT, which is the Host displayed on the P4 Details page in the Helix Core Cloud portal.
-
To view your default P4 settings, type
p4 set
. -
To change the P4PORT value, type
p4 set P4PORT=<correct server address>
where<correct server address>
is the Host value displayed on the P4 Details page in the portal. Then, enterp4 set
again to view new values you set.
-
-
Under the
TypeMap:
line, indent and add lines for each file extension or path. See Syntax and Examples. -
Save the typemap file and close the text editor.
If the typemap is valid,
Typemap saved
is displayed at the command prompt. If the typemap is invalid, an error is displayed, which indicates that the typemap was not saved.
Syntax
-
Each line has two parts with a space between each:
-
A file type or modifier, or both
-
A depot path pattern to match against
-
-
You can specify a file type first, such as binary or text, and then add + to add modifiers.
-
You can specify a file type or +modifiers, or both.
-
Do not add + between each modifier.
-
Start a pattern with //, followed by the depot path and either * for all files in the folder or a specific file extension. Always use forward slashes.
-
Use ... as a wildcard to match any number of characters in any subfolders. Use * as a recursive wildcard to match any number of characters, but no subfolders,
For example, binary+wS2 //..._BuiltData.uasset
indicates that:
-
The server will detect any files ending with _BuiltData.uasset in any depots, streams, and subfolders as binary data.
-
Files ending in _BuildData.uasset in workspaces will be writable.
-
The server will only keep the most recent two versions of files ending in _BuiltData.usasset.
For more typemap examples, see Examples.
Common modifiers
Following are common modifiers used in a typemap. For a complete list, see File types in the Helix Core Command-Line (P4) Reference.
Modifier | Description | Useful for: |
---|---|---|
+w | Keeps files writable in workspaces. By default, files are read only until they are checked out. | Files that are updated automatically, but that you want to track, such as log and build files. |
+l | Set exclusive locking for files. When the file is checked out, it is automatically locked so others cannot edit it. | Binary files that should not be edited by multiple users at the same time and cannot be merged to avoid conflicts, such as specific game engine files, 3D models, images, and movies. |
+S# | Only stores the most recent versions of the file. Replace # with the number of revisions to keep. For example, +S2 stores the most recent two versions. |
Large files if you do not need all of their versions or files that change often but you do not want to store all of the changes. This can help save space on your Helix Core Server. |
Examples
Simple example
The following example typemap:
-
Treats all .meta files as binary regardless of the file contents.
-
Treats all .exe files as binary, makes them always writable, and only stores the latest revision on the server.
-
Automatically exclusively locks any .obj files in the project_a depot, does not lock any other files, and lets Helix Core automatically determine the file type.
TypeMap: binary //....meta binary+wS //....exe +l //project_a/....obj
Unreal Engine example
The following example typemap is for Unreal Engine. This typemap:
-
Sets some build files to always be writable and sets common binary assets, such as uasset files, to be +l (exclusively locked). Only one person can have a file checked out at a time. This is important for avoiding conflicts if two people are working on the same file.
-
Tells the server to only store the two latest revisions of BuiltData files and discard older revisions.
Typemap: binary+w //....exe binary+w //....dll binary+w //....lib binary+w //....app binary+w //....dylib binary+w //....stub binary+w //....ipa binary+l //....uasset binary+l //....umap binary+l //....upk binary+l //....udk binary+l //....ubulk binary+wS2 //..._BuiltData.uasset
Learn more
Where to go next
Next, create your first depot, which is the highest level of organization in Helix Core and stores all versioned files.
Go to Step 3: Create a depot | Helix Core Cloud administrators.