[Buildbot-devel] configuration help

Brian Warner warner-buildbot at lothar.com
Thu Nov 24 23:50:51 UTC 2005


> I see. As mentioned in a separate reply, I believe it would be most
> convenient (for me, at least) to be able to declare the svn repository
> layout inside the master.cfg file, as then I wouldn't have to touch
> svn_buildbot.py at all.

Hmm. So far I've been assuming that repository branch policy is part of the
repository, not part of the buildbot, but I can see how it would be more
convenient to be able to specify it inside the master.cfg file. While working
on the build-on-branch feature, I started at the end (on the buildslaves) and
worked my way back "upstream" towards the ChangeSources. Therefore I was able
to keep putting off the decision about where the branch names come from in
the first place. This issue of whether branches are calculated inside the
ChangeSource or back in the sender (svn_buildbot.py) is a reflection of this
deferred architecture decision (i.e., of my laziness :).

> It sounds as if I could somehow derive from PBChangeSource and then determine
> the branch during a call to my (redefined) perspective_addChange method.

Yeah, that would work. In that case you should probably assert that the
changes you're receiving from svn_buildbot.py have no 'branch' key, to guard
against running your derived BranchCalculatingPBChangeSource subclass in
conjunction with some new svn_buildbot_which_calculates_branches.py sender.

> (I think it would be nice to be able to just provide such a branch-detector
> as a callable I can provide to PBChangeSource's constructor.)

Yeah, I agree. I really want there to be a simple place where you put the
filename->branch conversion function, and it would be easiest to put it
somewhere in master.cfg . I'd like to change or get rid of the 'prefix='
argument at the same time, since it's doing vaguely the same thing.

I'm going to have to think about this part. Maybe there's a clean way to let
either the sender (svn_buildbot.py) or the recipient (PBChangeSource)
calculate the branch.

> ah, I didn't know about the branches=None option (is it documented at all ?).
> Indeed, I provided an explicit branch list, as suggested by the manual.

It's in the docstring (try pydoc buildbot.scheduler.AnyBranchScheduler), but
not in the manual. I just added a section to the manual giving brief
descriptions of all available schedulers, and pointing the reader at the
docstrings. I suppose I should copy the docstrings into the manual, but I'm a
little afraid of version skew.. how to make sure I remember to update the
manual when the source code and docstrings are updated. It'd be nice if
texinfo could interpolate external files or something.


thanks,
 -Brian




More information about the devel mailing list