Skip to content

Commit

Permalink
console: check codebase is in build before checking revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
thedylman committed May 19, 2013
1 parent ba6993e commit feafb2e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions master/buildbot/status/web/console.py
Expand Up @@ -376,6 +376,10 @@ def displaySlaveLine(self, status, builderList, debugInfo):

return slaves

def isCodebaseInBuild(self, build, codebase):
"""Check if codebase is used in build"""
return any(ss.codebase == codebase for ss in build.sourceStamps)

def isRevisionInBuild(self, build, revision):
""" Check if revision is in changes in build """
for ss in build.sourceStamps:
Expand Down Expand Up @@ -416,9 +420,10 @@ def displayStatusLine(self, builderList, allBuilds, revision, debugInfo):
if introducedIn:
firstNotIn = build
break
elif self.isRevisionInBuild( build, revision ):
introducedIn = build

elif self.isCodebaseInBuild(build, revision.codebase):
if self.isRevisionInBuild(build, revision):
introducedIn = build

# Get the results of the first build with the revision, and the
# first build that does not include the revision.
results = None
Expand Down

0 comments on commit feafb2e

Please sign in to comment.