Perforce Questions

So I have been working with perforce a bit and im trying to get things set up for a team.

I think I have a pretty good set up and I think I figured out the files that need to be unlocked, but I would really love to know how you guys at epic use perforce and what files should be unlocked and where they are.

Also I wasn’t too sure if this was the correct location for this so plz move if there is a better location!

Hi HugieDM,

We don’t lock any files ‘in a resting state’. Checked in executables are set +w so that programmers can build locally and overwrite them, and all binary assets are set to lock on checkout (this is the default for Perforce if it detects a file is binary, but I think we have a rule on the server that .uasset is always binary in case the detection messes up). I’ve started up a thread internally to see if there are any other interesting server side things we do.

Cheers,
Noland

Hey ,

Thank you for the reply! I would really love to know how I would go about setting up my perforce that way!

Im still a little new to perforce so not totally sure how to go about setting it up that way.

thanks

So I learned some coolness.
I set my P4 typemap to binary+w //…uasset
Now all of my uassets are not locked!

Should I set all of my Unreal project file types to that?

Hi HughieDM,

I wouldn’t recommend doing that for any project actually. We keep .uasset files read-only (don’t use +w for them) at Epic.

Sorry, I think there might have been a mixup between read-only and locked. By default all files are read-only in Perforce unless they are checked out. This has some advantages in that you have to think about whether you should/can modify that file before you start modifying it (in case it is a file that cannot be merged if someone else makes conflicting changes, like a .uasset or executable). Separately, you can lock a file in Perforce when you have it checked out. The default behavior is that text files aren’t locked (since you can merge conflicts), and binary files are locked (since you can’t).

The only files we use +w on are executables (the exe, dll, and pdbs in Engine\Binaries, though we don’t use the typemap for that either, it’s just set by hand when new binaries are added to the depot), so programmers can build locally without having to check out the binaries or remove them from their clientspec.

Cheers,
Noland

Hey,

Thats what I thought I was a bit confused by your last post. What about the auto save files how do you deal with though, because I get a pop up that says the file is locked and cannot be saved.

Hi HugieDM,

I’m guessing you checked in your Saved directory (which contains things like autosaves). Typically, you should only have Build, Config, and Content checked in, but not Saved or Intermediate.

I agree that we need better docs on this sort of setup and have forwarded the request on to the engine docs team.

Cheers,
Noland

Ah got it! Yeah it would be really helpful to see the way epic sets there perforce!

Thanks I’ll post if there are any other issues! Or if I learn anything new!

Reviving this thread. I’d love to see the “p4 typemap” output for Epic’s UE4 Perforce repository.

Edit: Never mind, just re-read Noland’s post that mentions they set binary+w by hand on files as they’re added to the depot.