Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 Server Administration Documentation | 2025.1

# Triggering on shelving events

To configure P4 Server to run trigger scripts when users work with shelved files, use shelve triggers: these are triggers of type `shelve-submit`, `shelve-commit`, and `shelve-delete`.

The following table describes the fields of a shelving type trigger:

Field | Meaning
--- | ---
`name` | The name of the trigger.
`type` | shelve-submit: Execute a pre-shelve trigger after changelist has been created and files locked, but prior to file transfer. shelve-commit: Execute a post-shelve trigger after files are shelved. shelve-delete: Execute a shelve trigger prior to discarding shelved files.
`path` | A file pattern in depot syntax. If a shelve contains any files in the specified path, the trigger fires. To prevent some shelving operations from firing these triggers, use an exclusionary mapping in the path.
`command` | The trigger for P4 Server to run when a matching `path` applies for the trigger type. Specify the command in a way that allows P4 Server account to locate and run the command. The `command` (typically a call to a script) must be quoted, and can take as arguments anything that your `command` is capable of parsing, including any applicable P4 Server trigger variables. When your trigger script is stored in the depot, its path must be specified in depot syntax, delimited by percent characters. For example, if your script is stored in the depot as `//depot/scripts/myScript.pl`, the corresponding value for the command field might be `"/usr/bin/perl %//depot/scripts/myScript.pl%"`. See Storing triggers in the depot for more information.

Your search for returned results