Customizing check in policy using Accurev

340 Views Asked by At

I'm using the AccuRev pre-promote trigger to implement a customized promotion policy check. AccuRev provides a trigger parameters file if the promotions are from a workspace to the stream. I'm able to successfully access this file and the policy works well for workspace to stream promotions. I'm looking for a similar strategy for stream-to-stream promotions (i.e. hook into something that gives me information such as the user who is promoting the issues, a list of issues that are getting promoted, or the source/destination stream) but no luck so far.

Is there AccuRev-provided data similar to the trigger parameters file for stream-to-stream promotions?

If not, any tips on how to approach this?

2

There are 2 best solutions below

0
On

Did you enable the server_preop_trig.pl trigger?

This is a server side trigger that will fire when a promotion occurs from either a workspace or stream.

This trigger can be found on the server under "accurev install dir"/examples.

If you have it enabled, look under "accurev install dir"/storage/site_slice/triggers

0
On

As previously mentioned, the server_preop_trig trigger is what you need to use to enforce any kind of policy. There is a functional example trigger script written in Perl that you can use to jump start what you want to do. Additionally, the AccuRev Administrator’s Guide has a section that fully documents how to enable triggers.