[Buildbot-devel] mult-changesource patch

Benoît Allard benoit at aeteurope.nl
Fri Oct 3 14:59:06 UTC 2008



Hans Lellelid wrote:
> Hi folks,
> 
> After exchanging a couple emails with Dustin yesterday, I put together a
> basic patch to add multi changesource support to Buildbot (or more
> specifically tracking of change source to scheduler).  I wanted to get some
> feedback on this before I wrap it up and add it to a Trac enhancement
> ticket.
> 
> What I did was to add a 'name' attribute to the ChangeSource (so far only
> to SVNPoller) and then added a 'sourcename' attribute to the Change object
> (so the system can keep track of which source a particular Change came
> from) and also an optional 'sourcename' attribute to the Scheduler class
> which works like the 'branch' attribute to limit the changes that a
> scheduler cares about.
> 
> This all sounds very minor (and was only a handful of lines of code), but
> it was really important for us to be able to have a single buildmaster with
> many projects and this seemed to be the easiest path to that solution.
> 
> A few notes:
>  - This isn't really "multi-project" as much as multi-changesource and
> changesource filtering on schedulers (e.g. there's no change to the web
> frontend to track different projects)
>  - I did add the source name to the logging messages, meaning that if it's
> not specifed you may see something like
> "SVNPoller(None:http://your.repo/url) initializing"
>  - As mentioned I only added the parameter support to the SVNPoller, but am
> happy to add it to the other change source classes if this patch would be
> accepted
> 
> The attached diff is against the Darcs trunk repo.
> 

Nice idea, I'm using here a patched buildbot with a similar something 
tuned for Mercurial. I called my property "repository", but the idea is 
there. I'll try to get an hand on a proper diff monday. I also have a 
new Scheduler (RepoScheduler) which schedule only for a list of 
repositories (via a list of regex), and some support for property 
expansion.

(For the records, unified diff (diff -u) are easier to read and apply)

Regards,
Benoit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4197 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://buildbot.net/pipermail/devel/attachments/20081003/1e82a482/attachment.bin>


More information about the devel mailing list