This project is to show examples of triggers for Perforce.
This is an example of a change-content trigger - with the following features:
Install an entry in triggers table similar to:
ValidateContent submit-content //depot/... "P4NetContentTrigger.exe -p %serverport% -u p4admin -c %changelist%"
The above assumes a user called "p4admin" with appropriate privileges to read the requiredand changelists, and with a login ticket accessible via the environment (so set P4TICKETS in the environment of your service and ensure this user is logged in and part of a Perforce group with Timeout: field set to "unlimited").
Parameters to P4NetContentTrigger.exe:
-p, --port (uses environment if not defined) P4PORT to connect to
-u, --user (uses environment if not defined) P4USER to connect as
-c, --change Required. Changelist to process/validate.
-t, --testing (Default: False) Testing mode - if first line of a file contains 'fail' will return error otherwise success.
-v, --verbose (Default: False) Makes sure log4net logging is set to Debug level. Otherwise edit log4net.properties file.
-h, --help