[Buildbot-devel] WithProperties() in a buildstep?
Tom Prince
tom.prince at ualberta.net
Wed Jun 22 19:30:37 UTC 2011
On Tue, 21 Jun 2011 11:28:21 -0700, Matthew Morse <matt at apple.com> wrote:
Non-text part: multipart/alternative
> Tom,
>
> Thanks for the hint, but I haven't been able to do much with it--this isn't territory I'm familiar with.
>
> Some questions:
>
> - Are you suggesting I create a subclass of the Git buildstep, or dynamically add to its definition, or ???
The best approach is probably simply to patch the Git step, and submit
that patch. But you could also create a subclass, or monkey patch the
list of renderables.
> - The attribute you refer to--is it part of the Git buildstep? How do I enumerate the attributes to see which one holds the branch arg?
For this you need to look at the constructor, to see where it stores the
branch argument.
> - How do I add attributes to the renderables list?
It is a class attribute, that contains a list of attribute names. You
simply need to add a new element to this list. Or, if you are
subclassing, you need to add that class attribute:
class ClassName(source.Git):
renderables = ['attribute_name', 'other_attribute']
Tom
More information about the devel
mailing list