[Buildbot-devel] SvnChangeSource was Re: RFC: more flexible web status display
Scott Lamb
slamb at slamb.org
Thu Apr 13 17:33:02 UTC 2006
On Apr 13, 2006, at 12:29 AM, Brian Warner wrote:
> From: "Niklaus Giger" <Niklaus.Giger at netstal.com>
>> I will give it a try. Probably not in the next two days but before
>> two weeks.
>
> Excellent!
>
> Look at buildbot/changes/p4poller.py to get started: you'll be
> creating a
> twisted.application.service.Service subclass, and using a
> LoopingCall to get
> the repeat-over-and-over behavior, which starts only after
> startService() has
> been invoked. You'll need to use utils.getProcessOutput() just like in
> p4poller to invoke "svn log --xml" correctly (without blocking the
> rest of
> the buildmaster).
Hey, if you're going to be using p4poller as an example, use the
attached one instead. It makes some improvements:
- it understands branches. The next path component after your base is
taken to be the path name. (I haven't looked at how the Subversion
push one works; maybe its way is similar.) It makes a dictionary as
it goes in case a single Perforce change contains changes to multiple
branches and thus needs to be mapped to multiple buildbot Change
objects.
- it reports error return from p4. (Try it when P4PORT points to a
socket in which nothing is listening.)
- it gets the results back from the first poll. This is the SIGCHLD
problem I mailed the list about a couple days ago.
- it won't launch a new "p4 changes" if the last one hasn't finished.
(In other words, if the server is struggling, it doesn't make matters
worse.)
This is part of a patch in progress.
--
Scott Lamb <http://www.slamb.org/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p4poller.py
Type: text/x-python-script
Size: 7091 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20060413/04c0d488/attachment.bin>
More information about the devel
mailing list