[Buildbot-commits] buildbot/buildbot/status builder.py,1.98,1.99

Brian Warner warner at users.sourceforge.net
Thu Aug 2 00:27:01 UTC 2007


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

Modified Files:
	builder.py 
Log Message:
[project @ waterfall: add branch= query-arg, to filter display by branch]

Original author: warner at lothar.com
Date: 2007-08-02 00:17:30+00:00

Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- builder.py	2 Aug 2007 00:07:18 -0000	1.98
+++ builder.py	2 Aug 2007 00:26:59 -0000	1.99
@@ -1466,7 +1466,7 @@
         except IndexError:
             return None
 
-    def eventGenerator(self):
+    def eventGenerator(self, branches=[]):
         """This function creates a generator which will provide all of this
         Builder's status events, starting with the most recent and
         progressing backwards in time. """
@@ -1476,12 +1476,18 @@
         # TODO: interleave build steps and self.events by timestamp.
         # TODO: um, I think we're already doing that.
 
+        # TODO: there's probably something clever we could do here to
+        # interleave two event streams (one from self.getBuild and the other
+        # from self.getEvent), which would be simpler than this control flow
+
         eventIndex = -1
         e = self.getEvent(eventIndex)
         for Nb in range(1, self.nextBuildNumber+1):
             b = self.getBuild(-Nb)
             if not b:
                 break
+            if branches and not b.getSourceStamp().branch in branches:
+                continue
             steps = b.getSteps()
             for Ns in range(1, len(steps)+1):
                 if steps[-Ns].started:





More information about the Commits mailing list