* Ordering by timestamp isn't a good idea here since a newer revision

might finish building before an older revision, and therefore have a
  lower timestamp.
This commit is contained in:
Eelco Dolstra 2009-03-18 16:46:01 +00:00
parent a1848b08f2
commit 702da969a6

View file

@ -156,7 +156,7 @@ sub fetchInputAlt {
# Pick the most recent successful build of the specified job.
(my $prevBuild) = $db->resultset('Builds')->search(
{finished => 1, project => $project->name, jobset => $jobset->name, job => $jobName, buildStatus => 0},
{join => 'resultInfo', order_by => "timestamp DESC", rows => 1});
{join => 'resultInfo', order_by => "id DESC", rows => 1});
if (!defined $prevBuild || !isValidPath($prevBuild->outpath)) {
print STDERR "no previous build available for `$jobName'";