• Executing an accurev mktrig command, specifying the location of the script. AccuRev simply records the location you specify in the repository; it doesn’t make a copy of the script. Make sure that no one moves it!pre-create-trig, pre-keep-trig, pre-promote-trig, server-post-promote-trigUse the mktrig command to enable use of the script in a particular depot. For example:The –p option isn’t necessary if your current directory is in a workspace associated with that depot. When the trigger fires, AccuRev will search for the script at the specified pathname (in the example above, /usr/ac_scripts/addheader).AccuRev recommends specifying an absolute pathname for the server-post-promote-trig only. Otherwise, when the trigger fires, AccuRev will use the search path of the AccuRev Server’s user identity to find the specified script file.You should not specify absolute pathnames for the pre-create-trig, pre-keep-trig, or pre-promote-trig. In this case, AccuRev uses the user’s search path to find the specified script file.
• UNIX/Linux: the file must be named server_admin_trig or server_admin_trig.pl (or server_master_trig or server_master_trig.pl)
• Place an executable file in subdirectory triggers of the slice directory of one or more depots (accurev show slices displays slice directory locations):
•
• Windows: the file must be named server_preop_trig.batPlace an executable file in the AccuRev executables (bin) directory on the AccuRev Server machine:
•
• Windows: the file must be named server_dispatch_post.batNote: for compatibility with previous AccuRev releases, the script can also be named dispatch_email, with the appropriate suffix.If you have multiple depots, you may wonder whether to use a single trigger for all depots, or separate triggers for each depot. There is no single correct approach, as it depends on what you are attempting to accomplish, and what level of granularity you need to achieve. For example, the basic administrative features of the server_admin_trig trigger might apply to all depots. If you configure some of its other features, you might need to configure it for specific depots. On the other hand, it is likely that you would want to implement separate server_preop_trig triggers for each depot.
• Create trigger scripts that have the exact same name for both platforms, but ensure that the Windows version has the appropriate extension (e.g., check_for_comments.bat), and that the UNIX/Linux script has no extension (check_for_comments).
• Adjust the PATH on your clients to point to the proper directory for their platform. For example, the PATH setting “S:\triggers” on Windows clients might be “/mnt1/ac/triggers” on UNIX/Linux machines.
• Execute the mktrig command, specifying the script name without a suffix, and without a qualifying path:Remember to revise all versions of a script when you revise any one of them.
Micro Focus |