[SCM] build.samba.org - branch master updated
Jelmer Vernooij
jelmer at samba.org
Sun Nov 21 19:23:03 MST 2010
The branch, master has been updated
via 036dd45 Fix use with multiple builds with the same checksum.
from 7e86dfd Drop checker prefix (color should be sufficient).
http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 036dd452ed5b7aec2cc376742d5db64fd375dda1
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Mon Nov 22 03:22:17 2010 +0100
Fix use with multiple builds with the same checksum.
-----------------------------------------------------------------------
Summary of changes:
buildfarm/sqldb.py | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildfarm/sqldb.py b/buildfarm/sqldb.py
index 47c33d3..56be24b 100644
--- a/buildfarm/sqldb.py
+++ b/buildfarm/sqldb.py
@@ -173,7 +173,8 @@ class StormCachingBuildResultStore(BuildResultStore):
self.store = store
def __contains__(self, build):
- return (self._get_by_checksum(build) is not None)
+ return not (self.store.find(StormBuild,
+ Cast(StormBuild.checksum, "TEXT") == build.log_checksum()).is_empty())
def get_previous_revision(self, tree, host, compiler, revision):
result = self.store.find(StormBuild,
@@ -208,13 +209,9 @@ class StormCachingBuildResultStore(BuildResultStore):
raise NoSuchBuildError(tree, host, compiler)
return build.revision
- def _get_by_checksum(self, build):
- result = self.store.find(StormBuild,
- Cast(StormBuild.checksum, "TEXT") == build.log_checksum())
- return result.one()
-
def upload_build(self, build):
- existing_build = self._get_by_checksum(build)
+ existing_build = self.store.find(StormBuild,
+ Cast(StormBuild.checksum, "TEXT") == build.log_checksum()).order_by(StormBuild.upload_time).first()
if existing_build is not None:
# Already present
assert build.tree == existing_build.tree
--
build.samba.org
More information about the samba-cvs
mailing list