[Buildbot-commits] buildbot/buildbot buildset.py, 1.10, 1.11 master.py, 1.115, 1.116 scheduler.py, 1.32, 1.33

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


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

Modified Files:
	buildset.py master.py scheduler.py 
Log Message:
[project @ #124:remove-custom-props.patch]
Remove custom properties, which are now largely redundant, and on which the
properties interface was modeled.

Original author: dustin at v.igoro.us
Date: 2008-04-13 19:55:26+00:00

Index: buildset.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/buildset.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- buildset.py	22 May 2008 22:13:17 -0000	1.10
+++ buildset.py	22 May 2008 22:13:21 -0000	1.11
@@ -11,7 +11,7 @@
     (source.changes=list)."""
 
     def __init__(self, builderNames, source, reason=None, bsid=None,
-                 custom_props=None, properties=None):
+                 properties=None):
         """
         @param source: a L{buildbot.sourcestamp.SourceStamp}
         """
@@ -19,8 +19,6 @@
         self.source = source
         self.reason = reason
 
-        self.custom_props = custom_props
-
         self.properties = Properties()
         if properties: self.properties.updateFromProperties(properties)
 
@@ -42,7 +40,6 @@
         # create the requests
         for b in builders:
             req = base.BuildRequest(self.reason, self.source, b.name, 
-                                    custom_props=self.custom_props,
                                     properties=self.properties)
             reqs.append((b, req))
             self.requests.append(req)

Index: master.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/master.py,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- master.py	22 May 2008 22:13:10 -0000	1.115
+++ master.py	22 May 2008 22:13:21 -0000	1.116
@@ -228,14 +228,13 @@
     def detached(self, mind):
         pass
 
-    def perspective_requestBuild(self, buildername, reason, branch, revision, custom_props):
-        assert isinstance(custom_props, dict), \
-               "custom_props must be a dict (not %r)" % (custom_props,)
-
+    def perspective_requestBuild(self, buildername, reason, branch, revision, properties={}):
         c = interfaces.IControl(self.master)
         bc = c.getBuilder(buildername)
         ss = SourceStamp(branch, revision)
-        br = BuildRequest(reason, ss, builderName=buildername, custom_props=custom_props)
+        properties = Properties()
+        properties.update(properties, "remote requestBuild")
+        br = BuildRequest(reason, ss, builderName=buildername, properties=properties)
         bc.requestBuild(br)
 
     def perspective_pingBuilder(self, buildername):

Index: scheduler.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- scheduler.py	22 May 2008 22:13:17 -0000	1.32
+++ scheduler.py	22 May 2008 22:13:21 -0000	1.33
@@ -685,8 +685,7 @@
         self.parent = parent
         self.username = username
 
-    def perspective_try(self, branch, revision, patch, builderNames,
-                        custom_props):
+    def perspective_try(self, branch, revision, patch, builderNames, properties={}):
         log.msg("user %s requesting build on builders %s" % (self.username,
                                                              builderNames))
         for b in builderNames:
@@ -698,11 +697,15 @@
         ss = SourceStamp(branch, revision, patch)
         reason = "'try' job from user %s" % self.username
 
+        # roll the specified props in with our inherited props
+        combined_props = Properties()
+        combined_props.updateFromProperties(self.parent.properties)
+        combined_props.update(properties, "try build")
+
         bs = buildset.BuildSet(builderNames, 
                                ss,
                                reason=reason, 
-                               custom_props=custom_props,
-                               properties=self.parent.properties)
+                               properties=combined_props)
 
         self.parent.submitBuildSet(bs)
 
@@ -728,7 +731,7 @@
     def getPendingBuildTimes(self):
         return []
 
-    def trigger(self, ss, custom_props={}, set_props=None):
+    def trigger(self, ss, set_props=None):
         """Trigger this scheduler. Returns a deferred that will fire when the
         buildset is finished.
         """
@@ -739,7 +742,7 @@
         props.updateFromProperties(self.properties)
         if set_props: props.updateFromProperties(set_props)
 
-        bs = buildset.BuildSet(self.builderNames, ss, custom_props=custom_props, properties=props)
+        bs = buildset.BuildSet(self.builderNames, ss, properties=props)
         d = bs.waitUntilFinished()
         self.submitBuildSet(bs)
         return d





More information about the Commits mailing list