Skip to content

Commit

Permalink
Fix issue with grid view optimization when actual available builds < …
Browse files Browse the repository at this point in the history
…numBuilds
  • Loading branch information
Amber Yust committed Feb 24, 2011
1 parent 1c1c9a0 commit 8f07867
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions master/buildbot/status/web/grid.py
Expand Up @@ -107,16 +107,22 @@ def getRecentBuilds(self, builder, numBuilds, branch):
while build and num < numBuilds:
start = build.getTimes()[0]
ss = build.getSourceStamp(absolute=True)
build = build.getPreviousBuild()

okay_build = True

# skip un-started builds
if not start: continue
if not start:
okay_build = False

# skip non-matching branches
if branch != ANYBRANCH and ss.branch != branch: continue
if branch != ANYBRANCH and ss.branch != branch:
okay_build = False

num += 1
yield build
if okay_build:
num += 1
yield build

build = build.getPreviousBuild()
return

def getRecentSourcestamps(self, status, numBuilds, categories, branch):
Expand Down

0 comments on commit 8f07867

Please sign in to comment.