Install the AccuRev Trigger

Once the installer is complete and you have completed the initial “bootstrap” page and the self-registration page, you need to install the AccuRev trigger server_master_trig.pl on the AccuRev Server:

Note: If you are using GitCentric in a replication environment, you need to perform this procedure on the master AccuRev Server. In addition, if you later add other AccuRev Servers to your GitCentric configuration, you must install server_master_trig.pl on those servers as well.
  1. Check to see if a triggers directory exists under <ac_home>/storage/site_slice. If not, create it.
  2. Copy the server_master_trig.pl file from <gc_home>/bin to the AccuRev Server triggers directory:
    > cd <gc_home>/bin
    > cp server_master_trig.pl <ac_home>/storage/site_slice/triggers
    > cd <ac_home>/storage/site_slice/triggers
    > chmod +x server_master_trig.pl
  3. Locate the ################ ACCUREV CLIENT PATH section in the server_master_trig.pl file and specify the path for your AccuRev Client. For example:
    $::AccuRev = "/usr/accurev/bin/accurev";
  4. Establish a persistent AccuRev login on the AccuRev Server with:
    accurev login-n <user><password>
  5. Test that server_master_trig.pl can compile:
    • Look at the first line of server_master_trig.pl and note the Perl executable that it expects to find (for example, “#!/usr/bin/perl”).
    • Using this path, use the perl -c command to test the trigger:
      > /usr/bin/perl -c ./server_master_trig.pl

      You know that your installation is complete and functioning when you see the message:

      server_master_trig syntax ok

      If any errors appear, address them before proceeding. For example, if Perl is not installed in the expected location, modify the path in server_master_trig.pl (or install it where the script expects to find it). If any optional Perl modules are missing, such as XML::Simple, install them. For example, as root try installing:

       libxml-sax-expat-perl
      cpan install XML::Simple
    Note: Whenever you add any additional AccuRev Servers to GitCentric, you will need to repeat these steps of copying and configuring the server_master_trig.pl file.
    Note: Microsoft Windows only: If you add a Microsoft Windows-based AccuRev Server to your GitCentric installation, you need to convert the .pl file to a batch file using the PL2BAT utility (PL2BAT should be part of your Perl distribution):
    >PL2BAT server_master_trig.pl