X157 Dev Notes

One simulant attempts to share insight with others.

Perforce Typemap

The typemap tells the server how to store and manage availability for files of various types.

You must configure it before you try to import any data into Perforce.

Updating P4 Typemap

To update the Typemap, save the example file as typemap.txt.

Then, in Powershell:

# Write typemap.txt contents into p4 typemap Input
cat typemap.txt | p4 typemap -i

Important Note about Typemap Ordering

You must list your entries in order of least specific to most specific.

For some reason this does not appear to be documented anywhere so I discovered this by trial-and-error. For example if you have:

# THIS IS THE WRONG ORDER, THIS WILL NOT WORK
Typemap:
    text+w //.../Binaries/....json
    text //....json

Then the initial text+w setting for .json files inside Binaries directories WILL BE IGNORED.

If you want all .json files to be treated as text, except for those inside Binaries directories, you must specify it in this order:

# Correct order:
Typemap:
    text //....json
    text+w //.../Binaries/....json

Example P4 Typemap

This is an example p4 typemap for a Lyra project with a UE 5.5 Engine.

https://github.com/XistGG/Perforce-Setup/blob/main/typemap.txt

See also: Official Perforce typemap Docs