[Buildbot-devel] Re: release clock started. Still problems with properties

Brian Warner warner-buildbot at lothar.com
Tue May 23 02:18:51 UTC 2006


> Then I tried to use the properties. I can only use the 'slavename'. All
> others get me exceptions. My master.cfg had entries like this:

We probably need some better examples in the docs. Many of the lines you've
commented out have incorrect syntax:

>         #WithProperties("build-%(branch)",  "branch"),  "branch",

This should be expressed as:

 WithProperties("build-%(branch)s"),  "branch",

(note the additional 's', and the lack of additional arguments to
WithProperties)

The "mapping form" of string interpolation uses the %(PROPNAME)s syntax, and
takes no additional arguments. You can use as many build properties as you
want in this form, but the property names always appear between the
parenthesis. The additional 's' tells the string formatting that you are
interpolating a string, as opposed to a number or a float or the other usual
printf specifiers.

The "list form" of string interpolation uses the "%s" syntax (no
parenthesis), and requires additional arguments to tell it which build
properties you want to use. For each %s (or %d or whatever) in the format
string, You must have one additional argument with the name of the build
property to be put in that slot.

Try this syntax and see if it works better. I'll add these notes to the docs.

cheers,
 -Brian




More information about the devel mailing list