#2165: Support ternary substitution in WithProperties
------------------------+-----------------------
Reporter:  jaredgrubb   |      Owner:
    Type:  enhancement  |     Status:  new
Priority:  minor        |  Milestone:  undecided
 Version:  0.8.5        |   Keywords:
------------------------+-----------------------
 I think it would be nice to have support for "if (prop) then substitute X
 else substitute Y".

 Python supports back-references in a regex, so I'm imagining that a
 possible syntax would be:

 `:?` + `delimiter` + `true_substitution` + `delimiter` +
 `false_substitution`

 For example:

 * `%(prop:?:sub_true:sub_false)s`
 * `%(prop:?|sub_true|sub_false)s`
 * `%(prop:?Asub_trueAsub_false)s`

 I'm not sure if ":?" would check the property based on existence (i.e. as
 ":+" does) or on true-ness (i.e. as ":~" does), or whether it would be
 nice to support both options?

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2165>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits

Reply via email to