[Buildbot-commits] buildbot/buildbot/status/web baseweb.py, 1.22, 1.23 waterfall.py, 1.21, 1.22

Brian Warner warner at users.sourceforge.net
Fri Sep 28 09:33:42 UTC 2007


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

Modified Files:
	baseweb.py waterfall.py 
Log Message:
[project @ web: make BuildTopBox and OneBoxPerBuilder respect branch= queryargs]

Original author: warner at lothar.com
Date: 2007-09-28 09:32:42+00:00

Index: baseweb.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/web/baseweb.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- baseweb.py	28 Sep 2007 09:33:31 -0000	1.22
+++ baseweb.py	28 Sep 2007 09:33:40 -0000	1.23
@@ -210,8 +210,10 @@
             builder = status.getBuilder(bn)
             data += "<tr>\n"
             data += "<td>%s</td>\n" % html.escape(bn)
-            b = builder.getLastFinishedBuild()
-            if b:
+            builds = list(builder.generateFinishedBuilds(branches,
+                                                         num_builds=1))
+            if builds:
+                b = builds[0]
                 url = (self.path_to_root(req) +
                        "builders/" +
                        urllib.quote(bn, safe='') +

Index: waterfall.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/web/waterfall.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- waterfall.py	28 Sep 2007 09:33:31 -0000	1.21
+++ waterfall.py	28 Sep 2007 09:33:40 -0000	1.22
@@ -99,14 +99,17 @@
 
     def getBox(self, req):
         assert interfaces.IBuilderStatus(self.original)
-        b = self.original.getLastFinishedBuild()
-        if not b:
+        branches = [b for b in req.args.get("branch", []) if b]
+        builds = list(self.original.generateFinishedBuilds(branches,
+                                                           num_builds=1))
+        if not builds:
             return Box(["none"], "white", class_="LastBuild")
+        b = builds[0]
         name = b.getBuilder().getName()
         number = b.getNumber()
         url = path_to_build(req, b)
         text = b.getText()
-        # TODO: add logs?
+        # TODO: maybe add logs?
         # TODO: add link to the per-build page at 'url'
         c = b.getColor()
         class_ = build_get_class(b)





More information about the Commits mailing list