Configure TypeMap settings

In this section, learn about:

Purpose of the TypeMap

Your TypeMap is a server-wide setting that determines how files are handled by the server. Your TypeMap only affects files added to the server after it was set up, so it is very important to set it up first.

Default TypeMap settings

By default, Helix Core will attempt to auto-detect if certain files should be stored as text or binary data.

By default, Helix Core will set all of your workspace files to read-only until you check them out. Any files set to always writable (+w) will not be set to read-only. This is useful for files that are changed automatically, rather than being checked out by a user.

Examples of common TypeMap modifiers

There are several different types of modifiers, but these three are the most commonly used:

  • +l automatically locks a file so multiple users don’t edit it at the same time. (This is very important for game engine binary files, which can’t be merged.)

  • +w always allows this file to be written.

  • +S tells Helix Core to only store the latest revision and not the entire history of revisions, saving space on your server. This is useful for large intermediate files that can be recreated if needed, such as baked lighting, shaders, or built executables. (You can also put a number after the S to specify a certain number of revisions to save.)

You can get more information about file types and many more file type modifiers in the Helix Core Command-Line Reference.

Edit the TypeMap

To edit the TypeMap, use a terminal window or command prompt and use the command-line client, p4.

  1. In a new command line prompt, type p4 typemap and press Enter.

    A text editor loads with a file.

    Note

    This text file must open in its own window. If you immediately get a message saying typemap not saved, close all instances of your text editor and run the command again.

  2. Underneath the line that says TypeMap:, indent and then add lines for each file extension and/or path you want to specify. On each line, specify the file type and/or modifiers, and the pattern to match.

    Things to note:

    • Patterns all start with //, followed by the server path and file extension.

    • Use ... as a wildcard to match any number of characters in any sub-folders.

    • Use * as a wildcard to match any number of characters but no sub-folders.

    The following sample TypeMap does three things:

    TypeMap:
        binary //....meta
        binary+wS //....exe
        +l //project_a/....obj
    
    1. Treat all .meta files as binary, regardless of their actual contents.

    2. Treat all .exe files as binary, keep them always writeable, and only store the latest revision on the server.

    3. Automatically lock any .obj files in the project_a depot (but no others), and let Helix Core determine their type automatically.

  3. After adding your file extensions and/or path, save the TypeMap file and close the text editor. You should see the TypeMap saved in the terminal window.

Sample Unreal Engine TypeMap

Use the following TypeMap for Unreal Engine to get started or customize as per your need. Be sure to read through some TypeMap examples and make sure you understand what they do.

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+wS //..._BuiltData.uasset