Download Perforce 97.3 Command Line User`s Manual

Transcript
Chapter 11 : Change Review & Other Daemons
5XQQLQJWKH'DHPRQ
Change review is implemented via a PERL script, perfreview.perl, which can be
downloaded from
http://www.perforce.com/perforce/loadsupp.html
This review daemon must be run under PERL 4 or higher; SENDMAIL is also required. It’s
usually run from the P4D server account, in the same directory as the P4D server, although
it can be installed anywhere. Once it’s been installed, do the following:
For more
information on
P4PORT, see
Chapter 11 or
Appendix A.
1.
Edit the script and follow the instructions at the top. You may need to change the values of certain values in the script, including the locations of the PERL and SENDMAIL
executables.
2.
Make sure that the environment variable P4PORT is set the proper port so the review
daemon can communicate with the p4 server.
3.
Run perfreview.perl in the background, with
perfreview.perl &
4.
This protection level
is described in
Chapter 14.
Make sure that the review daemon is running as a user with review or superuser access.
If protections are in their default non-enabled state, the review daemon will automatically have review access.
The script can be modified to provide any desired functionality. For example, you may
want to change the text of the outgoing message, or you might change the script to write
change reviews to files instead of sending email.
+RZWKH5HYLHZ'DHPRQ:RUNV
The review daemon is quite simple. Every time a changelist is submitted to the PERFORCE
depot, email is sent to every user who has subscribed to review any files that are contained
in that changelist. (Unlike other job review systems that you may be familiar with, the
PERFORCE system doesn’t require the email recipient to respond; the email message is sent
for notification purposes only).
The daemon is implemented as follows:
1.
The PERFORCE depot is polled for submitted, unreviewed changelists with the command p4 review;
2. p4 reviews
is used to generate a list of reviewers for each of these changelists;
3.
SENDMAIL is used to email the p4 describe changelist description to each reviewer;
4.
The first three steps are repeated every sixty seconds; this value can be changed when
the review daemon is installed.
The commands used in steps 2 and 3, p4 reviews and p4 describe, are straightforward reporting commands. The p4 review command used in step 1 is rather unusual. All
these commands are described below.
Perforce 97.3 User’s Manual
80