Depending on its type, an AccuRev trigger is enabled in one of these ways:
• 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!Use 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).We strongly suggest specifying an absolute pathname. Otherwise, when the trigger fires, AccuRev will use the user’s search path (for pre-create-trig, pre-keep-trig, or pre-promote-trig) or the search path of the AccuRev Server’s user identity (for server-post-promote-trig) to find the specified script file.
•
• Windows: the file must be named server_admin_trig.batPlace 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 a mixed environment where you have both Windows and UNIX/Linux clients accessing the same depot, you can set up triggers that will operate for both.
• 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).
• Place both versions of the script in the same directory. (You can place the Windows and UNIX/Linux scripts in separate directories if you need to, but we recommend keeping them together for simplicity and ease of maintenance.) This directory needs to be visible to all clients--it needs to be exported or shared from the server, and mapped or mounted on the clients.
• 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 be “/mnt1/ac/triggers” on UNIX/Linux machines.
• Execute the mktrig command, specifying the script name without a suffix, and without a qualifying path:When called by a Windows client, the trigger script with an extension will get executed. When called by a UNIX/Linux client, the trigger script without the extension will get executed.Remember to revise all versions of a script when you revise any one of them.
AccuRev, Inc. |
Phone: 781-861-8700 |
Fax: 781-861-8704 |
support@accurev.com |