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

Jelmer Vernooij jelmer at samba.org
Sun Dec 19 16:38:15 MST 2010


The branch, master has been updated
       via  2ec2d06 Add +recent-ids.
      from  8703cf4 test for fixing heimdal build on aix

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


- Log -----------------------------------------------------------------
commit 2ec2d06b13ea3add35f8c131e533209d19d72764
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Dec 20 00:37:34 2010 +0100

    Add +recent-ids.

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

Summary of changes:
 buildfarm/build.py        |    9 +++++++++
 buildfarm/web/__init__.py |   10 ++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/build.py b/buildfarm/build.py
index 7689364..e8f9664 100644
--- a/buildfarm/build.py
+++ b/buildfarm/build.py
@@ -349,6 +349,15 @@ class Build(object):
         except IOError:
             raise LogFileMissing()
 
+    def has_log(self):
+        try:
+            f = self.read_log()
+        except LogFileMissing:
+            return False
+        else:
+            f.close()
+            return True
+
     def read_err(self):
         """read full err file"""
         try:
diff --git a/buildfarm/web/__init__.py b/buildfarm/web/__init__.py
index e401a31..84e7bb3 100755
--- a/buildfarm/web/__init__.py
+++ b/buildfarm/web/__init__.py
@@ -987,14 +987,20 @@ class BuildFarmApp(object):
         else:
             fn = wsgiref.util.shift_path_info(environ)
             if fn == "tree":
-                start_response('200 OK', [
-                    ('Content-type', 'text/html; charset=utf-8')])
                 tree = wsgiref.util.shift_path_info(environ)
                 subfn = wsgiref.util.shift_path_info(environ)
                 if subfn in ("", None, "+recent"):
+                    start_response('200 OK', [
+                        ('Content-type', 'text/html; charset=utf-8')])
                     page = ViewRecentBuildsPage(self.buildfarm)
                     yield "".join(self.html_page(form, page.render(myself, tree, get_param(form, 'sortby') or 'age')))
+                elif subfn == "+recent-ids":
+                    start_response('200 OK', [
+                        ('Content-type', 'text/plain; charset=utf-8')])
+                    yield "".join([x.log_checksum()+"\n" for x in self.buildfarm.get_tree_builds(tree) if x.has_log()])
                 else:
+                    start_response('200 OK', [
+                        ('Content-type', 'text/html; charset=utf-8')])
                     yield "Unknown subfn %s" % subfn
             elif fn == "host":
                 start_response('200 OK', [


-- 
build.samba.org


More information about the samba-cvs mailing list