The following triggers execute a procedure before the user-requested command executes. Each of these triggers has the ability to cancel execution of the user’s command. (See Trigger Script Exit Status on page 91.) Some of the triggers fire on the client machine, and others on the server machine. It’s possible for a single command (e.g. keep) to cause triggers to fire both on the client and on the server.
• pre-create-trig: fires on the client machine prior to execution of an add command (GUI: Add to Depot). It does not fire for an ln command (GUI: Paste Link), which creates a link element.)The trigger script must specify the element type (directory, text, binary, or ptext) of each element to be created by the command. This overrides the element type specified with the add –E option.
• pre-keep-trig: fires on the client machine prior to execution of a keep command.
• pre-promote-trig: fires on the client machine prior to execution of a promote command or a purge command (GUI: Revert to Backed Version or Revert to Most Recent Version).
• server_admin_trig: fires on the server machine prior to execution of certain commands. This is a repository-wide trigger — it fires no matter what depot, if any, the user’s command applies to. The following commands cause server_admin_trig to fire:
Note: when the chdepot command renames a depot, server_admin_trig fires twice: once for the renaming of the depot object (chdepot), then again for the renaming of the depot’s root-stream object (chstream). Similarly, when the chws command renames a workspace, server_admin_trig fires twice: once for the renaming of the workspace object (chws), then again for the renaming of the workspace stream object (chstream).
• The defcomp command is not visible to the user; it is used in the implementation of the include/exclude facility CLI commands incl, excl, incldo, and clear.
• The replica_sync command recognized by the server_admin_trig trigger corresponds to the replica sync command in the CLI.
• The write_schema command is generated by the AccuRev GUI when the Save button is clicked in the Schema Editor.
• server_preop_trig: fires on the server machine prior to execution of certain commands. This is a depot-specific trigger — it fires only for commands that operate on the depot(s) where the trigger has been activated. The following commands cause server_preop_trig to fire:
For add or keep, the server_preop_trig script can specify the exclusive file locking state (parallel or serial) of the element(s) processed by the command. This overrides any specification made with the –E command-line option.The server_admin_trig and server_preop_trig triggers are independent of each other and are fired by different sets of commands — for a given command, only one of these triggers will fire. But these triggers can fire in addition to the triggers enabled with the mktrig command (pre-create-trig, pre-keep-trig, pre-promote-trig, and server-post-promote-trig) and the server_dispatch_post trigger.
AccuRev, Inc. |
Phone: 781-861-8700 |
Fax: 781-861-8704 |
support@accurev.com |