Try a bit harder to not fetch from the upload directory when looking for old builds.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 13 Nov 2010 18:42:52 +0000 (19:42 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 13 Nov 2010 18:42:52 +0000 (19:42 +0100)
buildfarm/__init__.py
import-and-analyse.py

index 58b66fb6d0d63dff212edfa776a4675b0ac74710..8d593c4c34737af3d44ffa8f5bb77adc965cc5b0 100644 (file)
@@ -130,7 +130,7 @@ class BuildFarm(object):
         return perc
 
     def get_build(self, tree, host, compiler, rev=None):
-        if rev:
+        if rev is not None:
             return self.builds.get_build(tree, host, compiler, rev)
         else:
             return self.upload_builds.get_build(tree, host, compiler)
index ec61fba9a04b101ef4b4815bcbd66c944c298d7c..ed854eca42a1ac515581661a97ee6653fdb5fb7d 100755 (executable)
@@ -115,11 +115,13 @@ for build in buildfarm.get_new_builds():
         # Can't send a nastygram until there are 2 builds..
     else:
         try:
-            prev_build = buildfarm.get_build(build.tree, build.host, build.compiler, prev_rev)
+            assert prev_rev is not None
+            prev_build = buildfarm.builds.get_build(build.tree, build.host, build.compiler, prev_rev)
         except data.NoSuchBuildError:
             if opts.verbose >= 1:
                 print "Previous build %s has disappeared" % prev_build
         else:
+            assert build.log_checksum() != prev_build.log_checksum()
             check_and_send_mails(build.tree, build.host, build.compiler, build, prev_build)
 
     if not opts.dry_run: