Title: [221312] trunk/Websites/perf.webkit.org
- Revision
- 221312
- Author
- rn...@webkit.org
- Date
- 2017-08-29 14:28:04 -0700 (Tue, 29 Aug 2017)
Log Message
Build fix. OS X "revision" can have a space.
* public/include/commit-log-fetcher.php:
Modified Paths
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (221311 => 221312)
--- trunk/Websites/perf.webkit.org/ChangeLog 2017-08-29 21:18:49 UTC (rev 221311)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2017-08-29 21:28:04 UTC (rev 221312)
@@ -1,5 +1,11 @@
2017-08-29 Ryosuke Niwa <rn...@webkit.org>
+ Build fix. OS X "revision" can have a space.
+
+ * public/include/commit-log-fetcher.php:
+
+2017-08-29 Ryosuke Niwa <rn...@webkit.org>
+
Make it possible to specify A/B testing revision with a partial hash
https://bugs.webkit.org/show_bug.cgi?id=176047
Modified: trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php (221311 => 221312)
--- trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php 2017-08-29 21:18:49 UTC (rev 221311)
+++ trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php 2017-08-29 21:28:04 UTC (rev 221312)
@@ -8,12 +8,13 @@
static function find_commit_id_by_revision($db, $repository_id, $revision)
{
- if (!ctype_alnum($revision))
- return NULL;
$commit_rows = $db->query_and_fetch_all('SELECT commit_id FROM commits WHERE commit_repository = $1 AND commit_revision = $2', array($repository_id, $revision));
if ($commit_rows)
return $commit_rows[0]['commit_id'];
+ if (!ctype_alnum($revision))
+ return NULL;
+
$commit_rows = $db->query_and_fetch_all('SELECT commit_id FROM commits WHERE commit_repository = $1 AND commit_revision LIKE $2 LIMIT 2', array($repository_id, Database::escape_for_like($revision) . '%'));
if (!$commit_rows)
return NULL;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes