[p4] p4review daemon questions

David Weintraub qazwart at gmail.com
Mon Jun 11 14:37:49 PDT 2007


I finally decided to move my review daemon to a post submit trigger
because that way, I could handle a single changelist at a time instead
of attempting to figure out how many changelists I was handling.

That lead to a lot of advantages:

* I no longer had to run the "p4 review" or "p4 counter" commands to
find the changelists that I had to include. I knew that from the
trigger.

* I could just ran the "p4 -zag reviews -c $change" command and parse
the output. That would give me the list of users where I had to send
my email.

* I could set the "Reply To:" header in my email to the person who
submitted the changelist. A file you were watching got changed and you
want to know why? Hit the "reply" button and send the message to the
user who made the change.

* I no longer had to setup a cronjob and make sure that it was running.

I simply wrote my own trigger. As for the colorized diffs, that's the
developer's job and not yours. Give the developers the name of the
file they were watching and the description from the changelist.
Everything else is up to them.

There are disadvantages of running a review trigger vs. a review
daemon. I am running one more trigger with each submit. And while a
review daemon doesn't have to run on my Perforce server, the trigger
does. So, although the review trigger is easier to maintain and
simpler to do, it does put more stress on your Perforce server which
is something you might want to consider.

Imagine if you're Google with a 3000 Gb depot, and 3000 users with
reviews on various  files. When someone changes that one file, your
already worked to the limit Perforce server now has to send out
hundreds of email messages. Not only that, but there's probably about
100 submits happening per minute too. IIn that case, you probably
don't want to change from a review daemon to a review trigger.

On 6/11/07, Marc Wensauer <maillist.perforce.com at work.wnsr.net> wrote:
> So I've just implemented the p4review daemon and generally like its
> functionality.  However, I have a couple questions:
>
> * I currently have it scheduled to run in cron every minute, but I
> wonder if it would be more efficient if it just ran as part of a
> submit-complete trigger.  How do you have it configured to run?
>
> * The configuration is embedded within the p4review.py script -- how can
> I separate this out so that it sources a configuration file I can
> specify as an option?  (I'm totally new to Python)
>
> * What's the best way if I wanted to include individual file diffs?
>
> * Is there an easy way to generate HTML colorized diffs, like SVN-Notify
> (http://search.cpan.org/~dwheeler/SVN-Notify/)?
>
> Thanks for your advice,
> -Marc
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>


-- 
--
David Weintraub
qazwart at gmail.com


More information about the perforce-user mailing list