[Buildbot-commits] buildbot/docs buildbot.texinfo,1.147,1.148

Brian Warner warner at users.sourceforge.net
Mon May 26 23:52:25 UTC 2008


Update of /cvsroot/buildbot/buildbot/docs
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22229/docs

Modified Files:
	buildbot.texinfo 
Log Message:
[project @ #234:shell-style-substitutions.patch]
Add support for shell-style substitutions, e.g.,
%(propname:-replacement)s and %(propname:+replacement)s

Original author: dustin at v.igoro.us
Date: 2008-04-15 04:31:40+00:00

Index: buildbot.texinfo
===================================================================
RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- buildbot.texinfo	26 May 2008 23:52:19 -0000	1.147
+++ buildbot.texinfo	26 May 2008 23:52:23 -0000	1.148
@@ -4137,12 +4137,11 @@
 @cindex WithProperties
 
 You can use build properties in ShellCommands by using the
- at code{WithProperties} wrapper when setting the arguments of the
-ShellCommand. This interpolates the named build properties into the
-generated shell command. You can also use a @code{WithProperties}
-as the @code{workdir=} argument: this allows the working directory
-for a command to be varied for each build, depending upon various
-build properties.
+ at code{WithProperties} wrapper when setting the arguments of
+the ShellCommand. This interpolates the named build properties
+into the generated shell command.  Most step parameters accept
+ at code{WithProperties}.  Please file bugs for any parameters which
+do not.
 
 @example
 from buildbot.steps.shell import ShellCommand
@@ -4178,13 +4177,29 @@
 Don't forget the extra ``s'' after the closing parenthesis! This is
 the cause of many confusing errors. 
 
-Note that, like python, you can either do positional-argument
-interpolation @emph{or} keyword-argument interpolation, not both. Thus
-you cannot use a string like
- at code{WithProperties("foo-%(revision)s-%s", "branch")}.
+The dictionary-style interpolation supports a number of more advanced
+syntaxes, too.
 
-Most step parameters accept @code{WithProperties}.  Please file bugs
-for any parameters which do not.
+ at table @code
+
+ at item propname:-replacement
+If @code{propname} exists, substitute its value; otherwise,
+substitute @code{replacement}.  @code{replacement} may be empty
+(@code{%(propname:-)s})
+
+ at item propname:+replacement
+If @code{propname} exists, substitute @code{replacement}; otherwise,
+substitute an empty string.
+
+ at end table
+
+Although these are similar to shell substitutions, no other
+substitutions are currently supported, and @code{replacement} in the
+above cannot contain more substitutions.
+
+Note: like python, you can either do positional-argument interpolation
+ at emph{or} keyword-argument interpolation, not both. Thus you cannot use
+a string like @code{WithProperties("foo-%(revision)s-%s", "branch")}.
 
 @heading Common Build Properties
 





More information about the Commits mailing list