+2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
+
+ Another unreviewed build fix after r174477.
+
+ Don't try to insert a duplicated row into build_commits as it results in a database constraint error.
+
+ This has been caught by a test in /api/report. I don't know why I thought all tests were passing.
+
+ * public/include/report-processor.php:
+
2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
Unreviewed build fix after r174477.
if (abs($commit_row['commit_time'] - $commit_data['time']) > 1.0)
$this->exit_with_error('MismatchingCommitTime', array('existing' => $commit_row, 'new' => $commit_data));
- if (!$this->db->insert_row('build_commits', null,
- array('commit_build' => $build_id, 'build_commit' => $commit_row['commit_id']), null))
+ if (!$this->db->select_or_insert_row('build_commits', null,
+ array('commit_build' => $build_id, 'build_commit' => $commit_row['commit_id']), null, '*'))
$this->exit_with_error('FailedToRelateCommitToBuild', array('commit' => $commit_row, 'build' => $build_id));
}