A review notification script/daemon is a program that sends out (email) notification when files/jobs are submitted to a Perforce server.
This directory contains the original Perforce review notification "daemon" and a more serious rewrite named P4Review2.
P4Review2 is targeted for Python 2.7 and can be used with either P4Python or the command line client.
While the p4review.py is a great example to show Perforce administrators how to implement email notification it lacks the sophistication and features that many of our customers expects. While many Perforce admin updated the p4review.py to suit their requirement the result is usually a highly customized solution that only works for certain environment.
Because of that,P4Review2 was written with customization in mind - instead of modifying the script directly you can achieve most task by supplying a configuration instead.
Authenticates against SMTP and Perforce servers with TLS/SSL support.
Support unicode - even for non-ACSII characters in non-unicode enabled server iff you use a single encoding on the server.
Option to send email summary per user per invocation instead of one for each change.
Configurable limits on the maximum message size and number of emails that get sent.
Built-in logging and extensive command-line options to facilitate customization, testing and debugging.
Ships with useful defaults which you can customize via a single INI-like configuration file so you can be up and running in a matter of minutes.
Guards to prevent running multiple instances of the script by mistake.
Use P4Python when available for efficiency and fallback to the Perforce command line client gracefully.
Here is how to setup P4Review2 in 3 simple steps:
Create a configuration file using the defaults:
python p4review2.py --sample-config > p4review2.conf
The file is in INI-like format. Edit the file to match your environment. In particular, check settings for the following:
Simply set a setting to an empty string (without quotes) if it's not required.
Test the configuration with:
python p4review2.py -c p4review2.conf -P
When ready, create a crontab (Linux/UNIX)/scheduled task (Windows) to run the above command without the -P option. When used with Windows's task scheduler you may need to create a batch file which calls the script with the correct command-line options.
Most (if not all) configuration can be overwritten on the command line via options. See python p4review2.py -h for the complete list.
File a bug against the "lester-cheung-p4review" and start the description with "[p4review2]" if you see something missing.
There is also a forum thread for P4Review2.
|#1||14000||riesman||Installed p4review2 at work. It rocks.|
|#5||13861||lester_cheung||Fixed typo - thanks @giles!|
">" doesn't need HTML escaping in Markdown:
|#3||11939||lester_cheung||HTML escape the ">" char|
|#2||11938||lester_cheung||Removing stray </code>|
|#1||11937||lester_cheung||Merging all docs (in various format) into README (in markdown)|
|#1||8454||lester_cheung||Docs for p4review2|