[Buildbot-commits] buildbot/buildbot/process base.py, 1.82, 1.83 properties.py, 1.3, 1.4

Brian Warner warner at users.sourceforge.net
Thu May 22 22:13:13 UTC 2008


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

Modified Files:
	base.py properties.py 
Log Message:
[project @ #124:global-properties.patch]
Support global properties, defined with c['properties'] = {} in master.cfg

Original author: dustin at v.igoro.us
Date: 2008-04-13 00:32:42+00:00

Index: base.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/base.py,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- base.py	22 May 2008 22:13:06 -0000	1.82
+++ base.py	22 May 2008 22:13:11 -0000	1.83
@@ -273,7 +273,9 @@
     def setupProperties(self):
         props = self.getProperties()
 
-        #props.updateFromProperties(self.global_properties) TODO
+        # start with global properties from the configuration
+        buildmaster = self.builder.botmaster.parent
+        props.updateFromProperties(buildmaster.properties)
 
         # get any properties from requests (this is the path through
         # which schedulers will send us properties)

Index: properties.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/properties.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- properties.py	22 May 2008 22:13:06 -0000	1.3
+++ properties.py	22 May 2008 22:13:11 -0000	1.4
@@ -18,13 +18,12 @@
     As a special case, a property value of None is returned as an empty 
     string when used as a mapping.
     """
-    def __init__(self, props={}, props_source=''):
+    def __init__(self, **kwargs):
         """
-        @param props: dictionary giving initial property values (for testing)
-        @param props_source: source to use for props
+        @param kwargs: initial property values (for testing)
         """
         self.properties = {}
-        if props: self.update(props, props_source)
+        if kwargs: self.update(kwargs, "TEST")
 
     def __getitem__(self, name):
         """Just get the value for this property, special-casing None -> ''"""





More information about the Commits mailing list