Case sensitivity and multi-platform development

To avoid the risk of errors or confusion when adding and syncing files with similar names in a cross-platform environment, be aware that:

  • A Helix Core Server on Linux is case-sensitive for names.

  • A Helix Core Server on Windows ignores case differences in names.

If you do not know the platform of your Helix Core Server, run p4 info and look for Server version in the output, where P4D/NTX64 means Windows and LINUX26X86_64 means Linux.

Linux clients connected to a Windows server

Users running Linux and connecting to a Helix Core Server running Windows need to remember that Windows ignores variations of case in the name of any file or path.

Suppose a Linux user submits the following three files to a Windows server, expecting DIR and dir to be treated as two distinct directories:

p4 add //project1/dir/file
p4 add //project1/dir/file2
p4 add //project1/DIR/file3

Linux-based clients consider file3 to be in the DIR directory because Linux is a case-sensitive operating system.

However, the Windows server honors the case of the first reference, which is dir not DIR. Therefore, file1, file2, and file3 are all in the dir directory. Indeed, if the Windows server has a //project/dir directory, it cannot also have a //project/DIR directory.

Windows clients connected to a Linux server

When Windows users add new files to a Linux server, it is best to be consistent about the names of directories and files. For example, files added to the depot in depot syntax as //depot/main/one.c and //depot/MAIN/two.c will appear in two different directories, main and MAIN, when synced to a Linux user’s workspace.

Suppose a Linux user has already submitted these three files to a Linux server:

p4 add //project1/dir/readme.html
p4 add //project1/dir/Readme.html
p4 add //project1/dir/README.html

When Windows users individually sync each of those files in that same order, Readme.html overwrites readme.html, and then README.html overwrites Readme.html. Thus, instead of three files on disk, there is only one.

Lowercase default for workspaces

When a client is connected to a Linux server, the default name for new client workspaces follows the name of the workstation in lowercase. For example, if a new user creates a client workspace on a Windows machine named ROCKET, this client workspace is named rocket by default. If the user later sets the P4CLIENT variable to ROCKET or Rocket, the Helix Server will display a message that the workspace is undefined. To fix the problem, the Windows user must set P4CLIENT to rocket or unset P4CLIENT.

Case sensitivity for Helix Core Cloud

When you sign up for Helix Core Cloud, you can choose to use case-insensitive mode. Do not select the Use case-insensitive mode check box unless you have a specific need to support a case-insensitive client application, such as Epic Games' UnrealGameSync. You cannot change this mode after Helix Core Cloud deployment.

Trigger to enforce consistent names

If you want to enforce the input of consistent path names, consider writing a pre-submit trigger. See Triggering before or after commands.