Using triggers with fetch and push
Helix triggers are user-written programs called by a Helix Versioning Engine when certain operations are performed. You use triggers to extend or customize Helix functionality. Triggers are of different types, depending on the event that causes the trigger to execute.
The trigger types in the list below have been defined to help you customize the
processing done in committing changes in a distributed versioning environment.
These three types may be invoked during the execution of the p4 push
, p4
fetch
, or p4 unzip
commands.
- Use push-submit triggers to customize processing during that phase of the
push
/fetch
/unzip
command when metadata has been transferred but files have not yet been transferred. - Use push-content triggers to customize processing during that phase of the
push
/fetch
/unzip
command when files have been transferred but their contents have not yet been committed. - Use
push-commit
triggers to do any clean up work or other post processing work after changes have been committed.
Note
Push triggers are disabled by default for the p4 unzip
command. See
the
p4
unzip
command in the P4 Command Reference for instructions on how to enable
push triggers.
For more information, see "Triggering on pushes and fetches" in the "Scripting Perforce: Triggers and Daemons" chapter of the Helix Versioning Engine Administrator Guide: Fundamentals.