<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[212947] trunk/Websites/perf.webkit.org</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/212947">212947</a></dd>
<dt>Author</dt> <dd>dewei_zhu@apple.com</dd>
<dt>Date</dt> <dd>2017-02-23 23:17:48 -0800 (Thu, 23 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Rename 'commit_parent' in 'commits' table to 'commit_previous_commit'.
https://bugs.webkit.org/show_bug.cgi?id=168816

Reviewed by Ryosuke Niwa.

Rename 'commit_parent' to avoid ambiguity in the coming feature.
For exisiting database, run
    &quot;ALTER TABLE commits RENAME commit_parent TO commit_previous_commit;&quot;
to update the database.

* init-database.sql:
* public/api/report-commits.php:
* public/include/commit-log-fetcher.php:
* server-tests/api-commits.js:
(then):
* server-tests/api-report-commits-tests.js:
(then):
* tools/sync-commits.py:
(main):
(Repository.fetch_commits_and_submit):
(GitRepository._revision_from_tokens):
* unit-tests/analysis-task-tests.js:
(sampleAnalysisTask):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebsitesperfwebkitorgChangeLog">trunk/Websites/perf.webkit.org/ChangeLog</a></li>
<li><a href="#trunkWebsitesperfwebkitorginitdatabasesql">trunk/Websites/perf.webkit.org/init-database.sql</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicapireportcommitsphp">trunk/Websites/perf.webkit.org/public/api/report-commits.php</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicincludecommitlogfetcherphp">trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php</a></li>
<li><a href="#trunkWebsitesperfwebkitorgservertestsapicommitsjs">trunk/Websites/perf.webkit.org/server-tests/api-commits.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgservertestsapireportcommitstestsjs">trunk/Websites/perf.webkit.org/server-tests/api-report-commits-tests.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgtoolssynccommitspy">trunk/Websites/perf.webkit.org/tools/sync-commits.py</a></li>
<li><a href="#trunkWebsitesperfwebkitorgunittestsanalysistasktestsjs">trunk/Websites/perf.webkit.org/unit-tests/analysis-task-tests.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebsitesperfwebkitorgChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/ChangeLog (212946 => 212947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/ChangeLog        2017-02-24 06:57:04 UTC (rev 212946)
+++ trunk/Websites/perf.webkit.org/ChangeLog        2017-02-24 07:17:48 UTC (rev 212947)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2017-02-23  Dewei Zhu  &lt;dewei_zhu@apple.com&gt;
+
+        Rename 'commit_parent' in 'commits' table to 'commit_previous_commit'.
+        https://bugs.webkit.org/show_bug.cgi?id=168816
+
+        Reviewed by Ryosuke Niwa.
+
+        Rename 'commit_parent' to avoid ambiguity in the coming feature.
+        For exisiting database, run
+            &quot;ALTER TABLE commits RENAME commit_parent TO commit_previous_commit;&quot;
+        to update the database.
+
+        * init-database.sql:
+        * public/api/report-commits.php:
+        * public/include/commit-log-fetcher.php:
+        * server-tests/api-commits.js:
+        (then):
+        * server-tests/api-report-commits-tests.js:
+        (then):
+        * tools/sync-commits.py:
+        (main):
+        (Repository.fetch_commits_and_submit):
+        (GitRepository._revision_from_tokens):
+        * unit-tests/analysis-task-tests.js:
+        (sampleAnalysisTask):
+
</ins><span class="cx"> 2017-02-23  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         New sampling algorithm shows very few points when zoomed out
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorginitdatabasesql"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/init-database.sql (212946 => 212947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/init-database.sql        2017-02-24 06:57:04 UTC (rev 212946)
+++ trunk/Websites/perf.webkit.org/init-database.sql        2017-02-24 07:17:48 UTC (rev 212947)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx">     commit_id serial PRIMARY KEY,
</span><span class="cx">     commit_repository integer NOT NULL REFERENCES repositories ON DELETE CASCADE,
</span><span class="cx">     commit_revision varchar(64) NOT NULL,
</span><del>-    commit_parent integer REFERENCES commits ON DELETE CASCADE,
</del><ins>+    commit_previous_commit integer REFERENCES commits ON DELETE CASCADE,
</ins><span class="cx">     commit_time timestamp,
</span><span class="cx">     commit_order integer,
</span><span class="cx">     commit_committer integer REFERENCES committers ON DELETE CASCADE,
</span><span class="lines">@@ -261,5 +261,5 @@
</span><span class="cx">     request_build integer REFERENCES builds,
</span><span class="cx">     request_created_at timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC'),
</span><span class="cx">     CONSTRAINT build_request_order_must_be_unique_in_group UNIQUE(request_group, request_order));
</span><del>-CREATE INDEX build_request_triggerable ON build_requests(request_triggerable);    
</del><ins>+CREATE INDEX build_request_triggerable ON build_requests(request_triggerable);
</ins><span class="cx"> CREATE INDEX build_request_build ON build_requests(request_build);
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicapireportcommitsphp"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/api/report-commits.php (212946 => 212947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/api/report-commits.php        2017-02-24 06:57:04 UTC (rev 212946)
+++ trunk/Websites/perf.webkit.org/public/api/report-commits.php        2017-02-24 07:17:48 UTC (rev 212947)
</span><span class="lines">@@ -47,21 +47,21 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        $parent_revision = array_get($commit_info, 'parent');
-        $parent_id = NULL;
-        if ($parent_revision) {
-            $parent_commit = $db-&gt;select_first_row('commits', 'commit', array('repository' =&gt; $repository_id, 'revision' =&gt; $parent_revision));
-            if (!$parent_commit) {
</del><ins>+        $previous_commit_revision = array_get($commit_info, 'previousCommit');
+        $previous_commit_id = NULL;
+        if ($previous_commit_revision) {
+            $previous_commit = $db-&gt;select_first_row('commits', 'commit', array('repository' =&gt; $repository_id, 'revision' =&gt; $previous_commit_revision));
+            if (!$previous_commit) {
</ins><span class="cx">                 $db-&gt;rollback_transaction();
</span><del>-                exit_with_error('FailedToFindParentCommit', array('commit' =&gt; $commit_info));
</del><ins>+                exit_with_error('FailedToFindPreviousCommit', array('commit' =&gt; $commit_info));
</ins><span class="cx">             }
</span><del>-            $parent_id = $parent_commit['commit_id'];
</del><ins>+            $previous_commit_id = $previous_commit['commit_id'];
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         $data = array(
</span><span class="cx">             'repository' =&gt; $repository_id,
</span><span class="cx">             'revision' =&gt; $commit_info['revision'],
</span><del>-            'parent' =&gt; $parent_id,
</del><ins>+            'previous_commit' =&gt; $previous_commit_id,
</ins><span class="cx">             'order' =&gt; array_get($commit_info, 'order'),
</span><span class="cx">             'time' =&gt; array_get($commit_info, 'time'),
</span><span class="cx">             'committer' =&gt; $committer_id,
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicincludecommitlogfetcherphp"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php (212946 => 212947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php        2017-02-24 06:57:04 UTC (rev 212946)
+++ trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php        2017-02-24 07:17:48 UTC (rev 212947)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">     function fetch_between($repository_id, $first, $second, $keyword = NULL) {
</span><span class="cx">         $statements = 'SELECT commit_id as &quot;id&quot;,
</span><span class="cx">             commit_revision as &quot;revision&quot;,
</span><del>-            commit_parent as &quot;parent&quot;,
</del><ins>+            commit_previous_commit as &quot;previousCommit&quot;,
</ins><span class="cx">             commit_time as &quot;time&quot;,
</span><span class="cx">             committer_name as &quot;authorName&quot;,
</span><span class="cx">             committer_account as &quot;authorEmail&quot;,
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx">         return array(
</span><span class="cx">             'id' =&gt; $commit_row['commit_id'],
</span><span class="cx">             'revision' =&gt; $commit_row['commit_revision'],
</span><del>-            'parent' =&gt; $commit_row['commit_parent'],
</del><ins>+            'previousCommit' =&gt; $commit_row['commit_previous_commit'],
</ins><span class="cx">             'time' =&gt; Database::to_js_time($commit_row['commit_time']),
</span><span class="cx">             'order' =&gt; $commit_row['commit_order'],
</span><span class="cx">             'authorName' =&gt; $committer_row ? $committer_row['committer_name'] : null,
</span><span class="lines">@@ -131,4 +131,4 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-?&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+?&gt;
</ins></span></pre></div>
<a id="trunkWebsitesperfwebkitorgservertestsapicommitsjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/server-tests/api-commits.js (212946 => 212947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/server-tests/api-commits.js        2017-02-24 06:57:04 UTC (rev 212946)
+++ trunk/Websites/perf.webkit.org/server-tests/api-commits.js        2017-02-24 07:17:48 UTC (rev 212947)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">             },
</span><span class="cx">             {
</span><span class="cx">                 &quot;repository&quot;: &quot;WebKit&quot;,
</span><del>-                &quot;parent&quot;: &quot;210949&quot;,
</del><ins>+                &quot;previousCommit&quot;: &quot;210949&quot;,
</ins><span class="cx">                 &quot;revision&quot;: &quot;210950&quot;,
</span><span class="cx">                 &quot;time&quot;: &quot;2017-01-20T03:49:37.887Z&quot;,
</span><span class="cx">                 &quot;author&quot;: {&quot;name&quot;: &quot;Commit Queue&quot;, &quot;account&quot;: &quot;commit-queue@webkit.org&quot;},
</span><span class="lines">@@ -51,6 +51,11 @@
</span><span class="cx">         assert.equal(commit['message'], submitted['message']);
</span><span class="cx">         assert.equal(commit['authorName'], submitted['author']['name']);
</span><span class="cx">         assert.equal(commit['authorEmail'], submitted['author']['account']);
</span><ins>+        if(submitted['previousCommit']) {
+            assert.ok(commit['previousCommit']);
+        } else {
+            assert.equal(commit['previousCommit'], null);
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     describe('/api/commits/&lt;repository&gt;/', () =&gt; {
</span><span class="lines">@@ -88,8 +93,9 @@
</span><span class="cx">                 assertCommitIsSameAsOneSubmitted(commits[0], submittedCommits[0]);
</span><span class="cx">                 assertCommitIsSameAsOneSubmitted(commits[1], submittedCommits[1]);
</span><span class="cx">                 assertCommitIsSameAsOneSubmitted(commits[2], submittedCommits[2]);
</span><ins>+                assert.equal(commits[2]['previousCommit'], commits[1]['id']);
</ins><span class="cx">             });
</span><del>-        });        
</del><ins>+        });
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     describe('/api/commits/&lt;repository&gt;/oldest', () =&gt; {
</span><span class="lines">@@ -230,7 +236,7 @@
</span><span class="cx">                 assert.equal(result['status'], 'OK');
</span><span class="cx">                 assert.equal(result['commits'].length, 1);
</span><span class="cx">                 assertCommitIsSameAsOneSubmitted(result['commits'][0], {
</span><del>-                    parent: null,
</del><ins>+                    previousCommit: null,
</ins><span class="cx">                     revision: '210950',
</span><span class="cx">                     time: '2017-01-20T03:49:37.887Z',
</span><span class="cx">                     author: {name: null, account: null},
</span><span class="lines">@@ -299,7 +305,7 @@
</span><span class="cx">                 assert.equal(result['status'], 'OK');
</span><span class="cx">                 assert.deepEqual(result['commits'].length, 2);
</span><span class="cx">                 assertCommitIsSameAsOneSubmitted(result['commits'][0], {
</span><del>-                    parent: null,
</del><ins>+                    previousCommit: null,
</ins><span class="cx">                     revision: '210949',
</span><span class="cx">                     time: '2017-01-20T03:23:50.645Z',
</span><span class="cx">                     author: {name: null, account: null},
</span><span class="lines">@@ -306,7 +312,7 @@
</span><span class="cx">                     message: null,
</span><span class="cx">                 });
</span><span class="cx">                 assertCommitIsSameAsOneSubmitted(result['commits'][1], {
</span><del>-                    parent: null,
</del><ins>+                    previousCommit: null,
</ins><span class="cx">                     revision: '210950',
</span><span class="cx">                     time: '2017-01-20T03:49:37.887Z',
</span><span class="cx">                     author: {name: null, account: null},
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgservertestsapireportcommitstestsjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/server-tests/api-report-commits-tests.js (212946 => 212947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/server-tests/api-report-commits-tests.js        2017-02-24 06:57:04 UTC (rev 212946)
+++ trunk/Websites/perf.webkit.org/server-tests/api-report-commits-tests.js        2017-02-24 07:17:48 UTC (rev 212947)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">             },
</span><span class="cx">             {
</span><span class="cx">                 &quot;repository&quot;: &quot;WebKit&quot;,
</span><del>-                &quot;parent&quot;: &quot;141977&quot;,
</del><ins>+                &quot;previousCommit&quot;: &quot;141977&quot;,
</ins><span class="cx">                 &quot;revision&quot;: &quot;141978&quot;,
</span><span class="cx">                 &quot;time&quot;: &quot;2013-02-06T09:54:56.0Z&quot;,
</span><span class="cx">                 &quot;author&quot;: {&quot;name&quot;: &quot;Mikhail Pozdnyakov&quot;, &quot;account&quot;: &quot;mikhail.pozdnyakov@intel.com&quot;},
</span><span class="lines">@@ -61,6 +61,21 @@
</span><span class="cx">                 &quot;message&quot;: &quot;another message&quot;,
</span><span class="cx">             }
</span><span class="cx">         ]
</span><ins>+    };
+
+    const subversionInvalidPreviousCommit = {
+        &quot;slaveName&quot;: &quot;someSlave&quot;,
+        &quot;slavePassword&quot;: &quot;somePassword&quot;,
+        &quot;commits&quot;: [
+            {
+                &quot;repository&quot;: &quot;WebKit&quot;,
+                &quot;previousCommit&quot;: &quot;99999&quot;,
+                &quot;revision&quot;: &quot;12345&quot;,
+                &quot;time&quot;: &quot;2013-02-06T08:55:20.9Z&quot;,
+                &quot;author&quot;: {&quot;name&quot;: &quot;Commit Queue&quot;, &quot;account&quot;: &quot;commit-queue@webkit.org&quot;},
+                &quot;message&quot;: &quot;some message&quot;,
+            }
+        ]
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     it(&quot;should reject error when slave name is missing&quot;, function (done) {
</span><span class="lines">@@ -158,6 +173,7 @@
</span><span class="cx">             assert.equal(commits[0]['time'].toString(), new Date('2013-02-06 08:55:20.9').toString());
</span><span class="cx">             assert.equal(commits[0]['message'], reportedData['message']);
</span><span class="cx">             assert.equal(commits[0]['committer'], committers[0]['id']);
</span><ins>+            assert.equal(commits[0]['previous_commit'], null);
</ins><span class="cx">             assert.equal(committers[0]['name'], reportedData['author']['name']);
</span><span class="cx">             assert.equal(committers[0]['account'], reportedData['author']['account']);
</span><span class="cx"> 
</span><span class="lines">@@ -166,6 +182,7 @@
</span><span class="cx">             assert.equal(commits[1]['time'].toString(), new Date('2013-02-06 09:54:56.0').toString());
</span><span class="cx">             assert.equal(commits[1]['message'], reportedData['message']);
</span><span class="cx">             assert.equal(commits[1]['committer'], committers[1]['id']);
</span><ins>+            assert.equal(commits[1]['previous_commit'], commits[0]['id']);
</ins><span class="cx">             assert.equal(committers[1]['name'], reportedData['author']['name']);
</span><span class="cx">             assert.equal(committers[1]['account'], reportedData['author']['account']);
</span><span class="cx"> 
</span><span class="lines">@@ -173,6 +190,19 @@
</span><span class="cx">         }).catch(done);
</span><span class="cx">     });
</span><span class="cx"> 
</span><ins>+    it(&quot;should fail if previous commit is invalid&quot;, function (done) {
+        const db = TestServer.database();
+        addSlaveForReport(subversionInvalidPreviousCommit).then(function () {
+            return TestServer.remoteAPI().postJSON('/api/report-commits/', subversionInvalidPreviousCommit);
+        }).then(function (response) {
+            assert.equal(response['status'], 'FailedToFindPreviousCommit');
+            return db.selectAll('commits');
+        }).then(function (result) {
+            assert.equal(result.length, 0);
+            done();
+        }).catch(done);
+    });
+
</ins><span class="cx">     it(&quot;should update an existing commit if there is one&quot;, function (done) {
</span><span class="cx">         const db = TestServer.database();
</span><span class="cx">         const reportedData = subversionCommit.commits[0];
</span><span class="lines">@@ -227,7 +257,7 @@
</span><span class="cx">             assert.equal(commits[0]['committer'], committers[0]['id']);
</span><span class="cx">             assert.equal(committers[0]['name'], firstData['author']['name']);
</span><span class="cx">             assert.equal(committers[0]['account'], firstData['author']['account']);
</span><del>-            
</del><ins>+
</ins><span class="cx">             assert.equal(commits[1]['id'], 3);
</span><span class="cx">             assert.equal(commits[1]['message'], null);
</span><span class="cx">             assert.equal(commits[1]['committer'], null);
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgtoolssynccommitspy"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/tools/sync-commits.py (212946 => 212947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/tools/sync-commits.py        2017-02-24 06:57:04 UTC (rev 212946)
+++ trunk/Websites/perf.webkit.org/tools/sync-commits.py        2017-02-24 07:17:48 UTC (rev 212947)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">     parser.add_argument('--server-config-json', required=True, help='The path to a JSON file that specifies the perf dashboard')
</span><span class="cx">     parser.add_argument('--seconds-to-sleep', type=float, default=900, help='The seconds to sleep between iterations')
</span><span class="cx">     parser.add_argument('--max-fetch-count', type=int, default=10, help='The number of commits to fetch at once')
</span><del>-    parser.add_argument('--max-ancestor-fetch-count', type=int, default=100, help='The number of commits to fetch at once if some commits are missing parents')
</del><ins>+    parser.add_argument('--max-ancestor-fetch-count', type=int, default=100, help='The number of commits to fetch at once if some commits are missing previous commits')
</ins><span class="cx">     args = parser.parse_args()
</span><span class="cx"> 
</span><span class="cx">     with open(args.repository_config_json) as repository_config_json:
</span><span class="lines">@@ -79,16 +79,16 @@
</span><span class="cx">             print &quot;Submitting revisions %s for %s to %s&quot; % (revision_list, self._name, server_config['server']['url'])
</span><span class="cx"> 
</span><span class="cx">             result = submit_commits(pending_commits, server_config['server']['url'],
</span><del>-                server_config['slave']['name'], server_config['slave']['password'], ['OK', 'FailedToFindParentCommit'])
</del><ins>+                server_config['slave']['name'], server_config['slave']['password'], ['OK', 'FailedToFindPreviousCommit'])
</ins><span class="cx"> 
</span><span class="cx">             if result.get('status') == 'OK':
</span><span class="cx">                 break
</span><span class="cx"> 
</span><del>-            if result.get('status') == 'FailedToFindParentCommit':
-                parent_commit = self.fetch_commit(server_config, result['commit']['parent'])
-                if not parent_commit:
-                    raise Exception('Could not find the parent %s of %s' % (result['commit']['parent'], result['commit']['revision']))
-                pending_commits = [parent_commit] + pending_commits
</del><ins>+            if result.get('status') == 'FailedToFindPreviousCommit':
+                previous_commit = self.fetch_commit(server_config, result['commit']['previousCommit'])
+                if not previous_commit:
+                    raise Exception('Could not find the previous commit %s of %s' % (result['commit']['previousCommit'], result['commit']['revision']))
+                pending_commits = [previous_commit] + pending_commits
</ins><span class="cx"> 
</span><span class="cx">         if result.get('status') != 'OK':
</span><span class="cx">             raise Exception(result)
</span><span class="lines">@@ -223,7 +223,7 @@
</span><span class="cx">         current_hash = tokens[0]
</span><span class="cx">         commit_time = int(tokens[1])
</span><span class="cx">         author_email = tokens[2]
</span><del>-        parent_hash = tokens[3] if len(tokens) &gt;= 4 else None
</del><ins>+        previous_hash = tokens[3] if len(tokens) &gt;= 4 else None
</ins><span class="cx"> 
</span><span class="cx">         author_name = self._run_git_command(['log', current_hash, '-1', '--pretty=%cn'])
</span><span class="cx">         message = self._run_git_command(['log', current_hash, '-1', '--pretty=%B'])
</span><span class="lines">@@ -231,7 +231,7 @@
</span><span class="cx">         return {
</span><span class="cx">             'repository': self._name,
</span><span class="cx">             'revision': current_hash,
</span><del>-            'parent': parent_hash,
</del><ins>+            'previousCommit': previous_hash,
</ins><span class="cx">             'time': datetime.fromtimestamp(commit_time).strftime(r'%Y-%m-%dT%H:%M:%S.%f'),
</span><span class="cx">             'author': {'account': author_email, 'name': author_name},
</span><span class="cx">             'message': message,
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgunittestsanalysistasktestsjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/unit-tests/analysis-task-tests.js (212946 => 212947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/unit-tests/analysis-task-tests.js        2017-02-24 06:57:04 UTC (rev 212946)
+++ trunk/Websites/perf.webkit.org/unit-tests/analysis-task-tests.js        2017-02-24 07:17:48 UTC (rev 212947)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">                 'id': '105975',
</span><span class="cx">                 'message': 'Commit message',
</span><span class="cx">                 'order': null,
</span><del>-                'parent': null,
</del><ins>+                'previousCommit': null,
</ins><span class="cx">                 'repository': '11',
</span><span class="cx">                 'revision': '196051',
</span><span class="cx">                 'time': 1454481246108
</span></span></pre>
</div>
</div>

</body>
</html>