[Buildbot-devel] Perforce (P4) commit trigger

Brian Warner warner-buildbot at lothar.com
Tue Sep 12 17:39:52 UTC 2006


> p4poller works and is unit tested. On the other hand, if you're set  
> on triggers instead of polling

Actually, if you go the trigger route, you should probably use the 'buildbot
sendchange' command[1]. That will take care of all the details of creating a
Change object and speaking PB without making you get your hands dirty with
python code. Run 'buildbot sendchange --help' for a list of the command-line
arguments you can use to control the Changes that get created and sent. Note
that this requires that you have a PBChangeSource[2] in your c['sources']
list.

For your particular purposes, the P4Poller is probably more appropriate, but
I mention sendchange because a lot of other version-control systems offer
some kind of commit hook that lets you run a shell command, and for those
systems 'buildbot sendchange' may be the easiest way to wire it up to the
buildmaster.

cheers,
 -Brian

[1]: http://buildbot.sourceforge.net/manual-0.7.4.html#sendchange
[2]: http://buildbot.sourceforge.net/manual-0.7.4.html#PBChangeSource




More information about the devel mailing list