Skip to content

Perforce TypeMap

What is a TypeMap

By default Perforce will try to dertermine what is the type of file to store. You can add some flag to treat certain files differently.

You will use TypeMap Modifiers.

+l

Automatically lock a file, so multiple users can't edit the file at the same time. (very important for game engine binary files, which can't be mereged)

Usefull for binary files, like levels files, 3d models etc.

+w

Always allow this files to be written

This is not the opposite of +l.

Generally used by files being modified by the program, not human. Useful for unreal engine library that you need to not have in readonly locally.

+S

Only store the latest revision of a file.

Useful for light build map.

You can also keep multiple revision if you add a number at the end like +S3 to only keep 3 revision of the file.

Set TypeMap

Open a terminal and type p4 typemap

This will open a text file, this is where you will put your TypeMap.

in p4, ... is recursive syntax.

Example

txt
TypeMap:
    binary //.....meta
    binary+wS //....exe
    +l //project_a/....obj

References: