General Notes on using Perforce with Helix IPLM
P4CONFIG
Helix IPLM places a P4 configuration file in each workspace. This file identifies the Perforce client (P4CLIENT), the host/port for the Perforce depot (P4PORT), and the name of the ignore file (P4IGNORE). Perforce uses the environment variable P4CONFIG to identify this file and the variable should be set in your environment, e.g.:
export P4CONFIG=.p4config
P4IGNORE
Optionally defines a list of files containing patterns to identify unmanaged files which should be ignored by P4 commands such as add and reconcile.
- If P4IGNORE is not set in the environment, Pi will use the default .p4ignore
- If P4IGNORE is a simple filename, Pi will create a link to the master ignore file $MDX_CONFIG_DIR/$P4IGNORE if it exists. Pi will warn if the master ignore file does not exist.
- If P4IGNORE is set to a full path or a semicolon-separated list, an ignore file will not be created in the workspace. Pi will not check if the file(s) exist.
More about the P4IGNORE file here. See the Perforce documentation for complete information about P4IGNORE.
Note regarding p4 protect
Early versions of Perforce did not support P4IGNORE and it was common practice to use the Perforce protection table to prevent unwanted files from being added to the depot.
This approach can cause performance problems and is no longer recommended.
In your p4 protect table, any lines of the format:
=open user * * -//...<pattern>
are intended to exclude files from the depot and if you try to add an unmanaged file matching <pattern> then Perforce will give a permissions error.
You can remove these lines from p4 protect and add a corresponding pattern to the template P4IGNORE file, for example:
=open user * * -//...~
can be replaced with the following line in the P4IGNORE file:
*~
Note: The syntax for the contents of a P4IGNORE
file is not the same as Perforce syntax. See the Perforce documentation for details.
Client Names
The Perforce client names are automatically generated and are unique for each workspace. The workspace client names are of the form:
- ws:<username>:<lib_name>.<ip_name>:<workspace_id>
Where <lib_name> and <ip_name> are taken from the top-level IP in the workspace and <workspace_id> is the trailing 8 characters of the workspace UUID generated by Helix IPLM
For example:
- <username> = fred
- <lib_name> = my_lib
- <ip_name> = my_ip
- <workspace_id> = abcd1234
Results in the client name:
- ws:fred:my_lib.my_ip:abcd1234