[SCM] build.samba.org - branch master updated

Jelmer Vernooij jelmer at samba.org
Sat Nov 13 08:29:22 MST 2010


The branch, master has been updated
       via  7176a9c Fix old revisions table.
      from  35a841a Improve performance of history browsing.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 7176a9c37bc30cb60844aca51b605287578ff9eb
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Nov 13 16:29:18 2010 +0100

    Fix old revisions table.

-----------------------------------------------------------------------

Summary of changes:
 web/build.py |   28 +++++++++++-----------------
 1 files changed, 11 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/web/build.py b/web/build.py
index f4f7aea..686ce8c 100755
--- a/web/build.py
+++ b/web/build.py
@@ -115,8 +115,7 @@ def html_build_status(status):
 
 
 def build_status_html(myself, build):
-    rawstatus = build.status()
-    status = html_build_status(rawstatus)
+    status = html_build_status(build.status())
     return build_link(myself, build.tree, build.host, build.compiler, build.revision, status)
 
 
@@ -467,9 +466,9 @@ class ViewBuildPage(BuildFarmPage):
 
     def show_oldrevs(self, myself, tree, host, compiler):
         """show the available old revisions, if any"""
-        revs = self.buildfarm.builds.get_old_revs(tree, host, compiler)
+        old_rev_builds  = self.buildfarm.builds.get_old_revs(tree, host, compiler)
 
-        if len(revs) == 0:
+        if len(old_rev_builds) == 0:
             return
 
         yield "<h2>Older builds:</h2>"
@@ -478,24 +477,19 @@ class ViewBuildPage(BuildFarmPage):
         yield "<thead><tr><th>Revision</th><th>Status</th></tr></thead>"
         yield "<tbody>"
 
-        lastrev = ""
-        for rev in revs:
-            s = html_build_status(rev["STATUS"])
-            revision = rev["REVISION"]
-            s = s.replace(revision, "0")
-            if s == lastrev:
-                continue
-            lastrev = s
-            yield "<tr><td>%s</td><td>%s</td></tr>" % (revision_link(myself, revision, tree), build_link(myself, tree, host, compiler, rev["REVISION"], html_build_status(rev["STATUS"])))
+        for build in old_rev_builds:
+            revision = build.revision
+            yield "<tr><td>%s</td><td>%s</td></tr>" % (
+                revision_link(myself, revision, tree),
+                build_link(myself, tree, host, compiler, revision,
+                    html_build_status(build.status())))
 
-        if lastrev != "":
-            # Only print table if there was any actual data
-            yield "</tbody></table>"
+        yield "</tbody></table>"
 
     def render(self, myself, tree, host, compiler, rev, plain_logs=False):
         """view one build in detail"""
         # ensure the params are valid before using them
-        #assert host in self.buildfarm.hostdb, "unknown host %s" % host
+        self.buildfarm.hostdb.host(host)
         assert compiler in self.buildfarm.compilers, "unknown compiler %s" % compiler
         assert tree in self.buildfarm.trees, "not a build tree %s" % tree
 


-- 
build.samba.org


More information about the samba-cvs mailing list