<!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>[196402] trunk/Tools</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/196402">196402</a></dd>
<dt>Author</dt> <dd>jmarcell@apple.com</dd>
<dt>Date</dt> <dd>2016-02-10 16:29:24 -0800 (Wed, 10 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Teach dashboard code to compare non-integer revisions
https://bugs.webkit.org/show_bug.cgi?id=152345

Reviewed by Daniel Bates.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype.compareIterationsByRevisions): Compare non-integer revisions.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView.prototype._appendPendingRevisionCount): Use Trac.indexOfRevision in order to compare non-integer
revisions. Also uses new Trac.commitsOnBranchLaterThanRevision method.
(BuildbotQueueView.prototype._popoverLinesForCommitRange): Ditto.
(BuildbotQueueView.prototype._presentPopoverForPendingCommits): Use Trac.indexOfRevision in order to compare non-integer
revisions. Also uses new Trac.nextRevision method to calculate a revision range.
(BuildbotQueueView.prototype._revisionContentWithPopoverForIteration): Ditto.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:
(Trac.prototype._commitsOnBranch): Renamed this to indicate that it should be a private method used by the latter two new
methods.
(Trac.prototype.commitsOnBranchLaterThanRevision): Finds revisions on a branch later than the specified revision.
(Trac.prototype.commitsOnBranchInRevisionRange): Finds revisions on a branch within a specified range.
(Trac.prototype.nextRevision): Finds the next revision after a given revision on a specific branch.
(Trac.prototype.indexOfRevision): Finds the index of a given revision within the recordedCommits array.
(Trac.prototype.commitsOnBranch): Deleted. Renamed to _commitsOnBranch.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js: Added unit tests.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotQueuejs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js</a></li>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotQueueViewjs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js</a></li>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsTracjs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js</a></li>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsteststestsjs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotQueuejs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js (196401 => 196402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js        2016-02-11 00:10:52 UTC (rev 196401)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js        2016-02-11 00:29:24 UTC (rev 196402)
</span><span class="lines">@@ -285,9 +285,15 @@
</span><span class="cx">         var sortedRepositories = Dashboard.sortedRepositories;
</span><span class="cx">         for (var i = 0; i &lt; sortedRepositories.length; ++i) {
</span><span class="cx">             var repositoryName = sortedRepositories[i].name;
</span><del>-            var result = b.revision[repositoryName] - a.revision[repositoryName];
-            if (result)
-                return result;
</del><ins>+            var trac = sortedRepositories[i].trac;
+            console.assert(trac);
+            var indexA = trac.indexOfRevision(a.revision[repositoryName]);
+            var indexB = trac.indexOfRevision(b.revision[repositoryName]);
+            if (indexA !== -1 &amp;&amp; indexB !== -1) {
+                var result = indexB - indexA;
+                if (result)
+                    return result;
+            }
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return 0;
</span></span></pre></div>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotQueueViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js (196401 => 196402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js        2016-02-11 00:10:52 UTC (rev 196401)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js        2016-02-11 00:29:24 UTC (rev 196402)
</span><span class="lines">@@ -94,12 +94,12 @@
</span><span class="cx">                 continue;
</span><span class="cx">             if (!trac)
</span><span class="cx">                 continue;
</span><del>-            if (!trac.latestRecordedRevisionNumber || trac.oldestRecordedRevisionNumber &gt; latestProductiveRevisionNumber) {
</del><ins>+            if (!trac.latestRecordedRevisionNumber || trac.indexOfRevision(trac.oldestRecordedRevisionNumber) &gt; trac.indexOfRevision(latestProductiveRevisionNumber)) {
</ins><span class="cx">                 trac.loadMoreHistoricalData();
</span><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            totalRevisionsBehind += trac.commitsOnBranch(branch.name, function(commit) { return commit.revisionNumber &gt; latestProductiveRevisionNumber; }).length;
</del><ins>+            totalRevisionsBehind += trac.commitsOnBranchLaterThanRevision(branch.name, latestProductiveRevisionNumber).length;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (!totalRevisionsBehind)
</span><span class="lines">@@ -140,11 +140,11 @@
</span><span class="cx">             return result;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        console.assert(trac.oldestRecordedRevisionNumber &lt;= firstRevisionNumber);
</del><ins>+        console.assert(trac.indexOfRevision(trac.oldestRecordedRevisionNumber) &lt;= trac.indexOfRevision(firstRevisionNumber));
</ins><span class="cx"> 
</span><span class="cx">         // FIXME: To be 100% correct, we should also filter out changes that are ignored by
</span><span class="cx">         // the queue, see _should_file_trigger_build in wkbuild.py.
</span><del>-        var commits = trac.commitsOnBranch(branch.name, function(commit) { return commit.revisionNumber &gt;= firstRevisionNumber &amp;&amp; commit.revisionNumber &lt;= lastRevisionNumber; });
</del><ins>+        var commits = trac.commitsOnBranchInRevisionRange(branch.name, firstRevisionNumber, lastRevisionNumber);
</ins><span class="cx">         return commits.map(function(commit) {
</span><span class="cx">             return lineForCommit.call(this, trac, commit);
</span><span class="cx">         }, this).reverse();
</span><span class="lines">@@ -169,7 +169,10 @@
</span><span class="cx">             var latestProductiveRevisionNumber = latestProductiveIteration.revision[repositoryName];
</span><span class="cx">             if (!latestProductiveRevisionNumber || !trac.latestRecordedRevisionNumber)
</span><span class="cx">                 continue;
</span><del>-            var lines = this._popoverLinesForCommitRange(trac, branch, latestProductiveRevisionNumber + 1, trac.latestRecordedRevisionNumber);
</del><ins>+            var nextRevision = trac.nextRevision(branch.name, latestProductiveRevisionNumber);
+            if (nextRevision === Trac.NO_MORE_REVISIONS)
+                continue;
+            var lines = this._popoverLinesForCommitRange(trac, branch, nextRevision, trac.latestRecordedRevisionNumber);
</ins><span class="cx">             var length = lines.length;
</span><span class="cx">             if (length &amp;&amp; shouldAddDivider)
</span><span class="cx">                 this._addDividerToPopover(content);
</span><span class="lines">@@ -220,22 +223,42 @@
</span><span class="cx">         var repository = branch.repository;
</span><span class="cx">         var repositoryName = repository.name;
</span><span class="cx">         console.assert(iteration.revision[repositoryName]);
</span><ins>+        var trac = repository.trac;
</ins><span class="cx">         var content = document.createElement(&quot;span&quot;);
</span><span class="cx">         content.textContent = this._formatRevisionForDisplay(iteration.revision[repositoryName], repository);
</span><span class="cx">         content.classList.add(&quot;revision-number&quot;);
</span><span class="cx"> 
</span><del>-        if (previousIteration) {
-            console.assert(previousIteration.revision[repositoryName]);
-            var context = {
-                trac: repository.trac,
-                branch: branch,
-                firstRevision: previousIteration.revision[repositoryName] + 1,
-                lastRevision: iteration.revision[repositoryName]
-            };
-            if (context.firstRevision &lt;= context.lastRevision)
-                new PopoverTracker(content, this._presentPopoverForRevisionRange.bind(this), context);
-        }
</del><ins>+        if (!previousIteration)
+            return content;
</ins><span class="cx"> 
</span><ins>+        var previousIterationRevision = previousIteration.revision[repositoryName];
+        console.assert(previousIterationRevision);
+        var previousIterationRevisionIndex = trac.indexOfRevision(previousIterationRevision);
+        if (previousIterationRevisionIndex === -1)
+            return content;
+
+        var firstRevision = trac.nextRevision(branch.name, previousIterationRevision);
+        if (firstRevision === Trac.NO_MORE_REVISIONS)
+            return content;
+        var firstRevisionIndex = trac.indexOfRevision(firstRevision);
+        console.assert(firstRevisionIndex !== -1);
+
+        var lastRevision = iteration.revision[repositoryName];
+        var lastRevisionIndex = trac.indexOfRevision(lastRevision);
+        if (lastRevisionIndex === -1)
+            return content;
+
+        if (firstRevisionIndex &gt; lastRevisionIndex)
+            return content;
+
+        var context = {
+            trac: trac,
+            branch: branch,
+            firstRevision: firstRevision,
+            lastRevision: lastRevision,
+        };
+        new PopoverTracker(content, this._presentPopoverForRevisionRange.bind(this), context);
+
</ins><span class="cx">         return content;
</span><span class="cx">     },
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsTracjs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js (196401 => 196402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js        2016-02-11 00:10:52 UTC (rev 196401)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js        2016-02-11 00:29:24 UTC (rev 196402)
</span><span class="lines">@@ -37,6 +37,8 @@
</span><span class="cx"> 
</span><span class="cx"> BaseObject.addConstructorFunctions(Trac);
</span><span class="cx"> 
</span><ins>+Trac.NO_MORE_REVISIONS = null;
+
</ins><span class="cx"> Trac.NeedsAuthentication = &quot;needsAuthentication&quot;;
</span><span class="cx"> Trac.UpdateInterval = 45000; // 45 seconds
</span><span class="cx"> 
</span><span class="lines">@@ -63,13 +65,42 @@
</span><span class="cx">         return this.recordedCommits[this.recordedCommits.length - 1].revisionNumber;
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    commitsOnBranch: function(branchName, filter)
</del><ins>+    _commitsOnBranch: function(branchName, beginPosition, endPosition)
</ins><span class="cx">     {
</span><del>-        return this.recordedCommits.filter(function(commit, index, array) {
-            return (!commit.containsBranchLocation || commit.branches.includes(branchName)) &amp;&amp; filter(commit, index, array);
-        });
</del><ins>+        beginPosition = beginPosition || 0;
+        if (endPosition === undefined)
+            endPosition = this.recordedCommits.length - 1;
+        var commits = [];
+        for (var i = beginPosition; i &lt;= endPosition; ++i) {
+            var commit = this.recordedCommits[i];
+            if (!commit.containsBranchLocation || commit.branches.includes(branchName))
+                commits.push(commit);
+        }
+        return commits;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    commitsOnBranchLaterThanRevision: function(branchName, revision)
+    {
+        var indexToBeLaterThan = this.indexOfRevision(revision);
+        console.assert(indexToBeLaterThan !== -1, revision + &quot; is not in the list of recorded commits&quot;);
+        if (indexToBeLaterThan === -1)
+            return [];
+        return this._commitsOnBranch(branchName, indexToBeLaterThan + 1);
+    },
+
+    commitsOnBranchInRevisionRange: function(branchName, firstRevision, lastRevision)
+    {
+        var indexOfFirstRevision = this.indexOfRevision(firstRevision);
+        console.assert(indexOfFirstRevision !== -1, firstRevision + &quot; is not in the list of recorded commits&quot;);
+        if (indexOfFirstRevision === -1)
+            return [];
+        var indexOfLastRevision = this.indexOfRevision(lastRevision);
+        console.assert(indexOfLastRevision !== -1, lastRevision + &quot; is not in the list of recorded commits&quot;);
+        if (indexOfLastRevision === -1)
+            return [];
+        return this._commitsOnBranch(branchName, indexOfFirstRevision, indexOfLastRevision);
+    },
+
</ins><span class="cx">     revisionURL: function(revision)
</span><span class="cx">     {
</span><span class="cx">         return this.baseURL + &quot;changeset/&quot; + encodeURIComponent(revision);
</span><span class="lines">@@ -266,4 +297,22 @@
</span><span class="cx">             this._loaded(dataDocument);
</span><span class="cx">         }.bind(this), this._needsAuthentication ? { withCredentials: true } : {});
</span><span class="cx">     },
</span><ins>+
+    nextRevision: function(branchName, revision)
+    {
+        var commits = this.commitsOnBranchLaterThanRevision(branchName, revision);
+        if (commits.length &gt; 0)
+            return commits[0].revisionNumber;
+        return Trac.NO_MORE_REVISIONS;
+    },
+
+    indexOfRevision: function(revision)
+    {
+        var commits = this.recordedCommits;
+        for (var i = 0; i &lt; commits.length; ++i) {
+            if (commits[i].revisionNumber === revision)
+                return i;
+        }
+        return -1;
+    },
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsteststestsjs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js (196401 => 196402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js        2016-02-11 00:10:52 UTC (rev 196401)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js        2016-02-11 00:29:24 UTC (rev 196402)
</span><span class="lines">@@ -72,6 +72,40 @@
</span><span class="cx">     strictEqual(this.trac._parseRevisionFromURL(&quot;https://git.foobar.com/trac/Whatever.git/changeset/0e498db5d8e5b5a342631&quot;), &quot;0e498db5d8e5b5a342631&quot;, &quot;Git&quot;);
</span><span class="cx"> });
</span><span class="cx"> 
</span><ins>+test(&quot;nextRevision&quot;, function()
+{
+    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+    strictEqual(this.trac.nextRevision(&quot;trunk&quot;, 33020), 33022, &quot;nextRevision same branch&quot;);
+    strictEqual(this.trac.nextRevision(&quot;trunk&quot;, 33019), 33020, &quot;nextRevision different branch&quot;);
+});
+
+test(&quot;indexOfRevision&quot;, function()
+{
+    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+    strictEqual(this.trac.indexOfRevision(33020), 2, &quot;indexOfRevision&quot;);
+});
+
+test(&quot;commitsOnBranchLaterThanRevision&quot;, function()
+{
+    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+    var commits = this.trac.commitsOnBranchLaterThanRevision(&quot;trunk&quot;, 33020);
+    equal(commits.length, 1, &quot;greater than 33020&quot;);
+});
+
+test(&quot;commitsOnBranchLaterThanRevision no commits&quot;, function()
+{
+    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+    var commits = this.trac.commitsOnBranchLaterThanRevision(&quot;someOtherBranch&quot;, 33021);
+    equal(commits.length, 0, &quot;greater than 33021&quot;);
+});
+
+test(&quot;commitsOnBranchInRevisionRange&quot;, function()
+{
+    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+    var commits = this.trac.commitsOnBranchInRevisionRange(&quot;trunk&quot;, 33020, 33022);
+    equal(commits.length, 2, &quot;in range 33020, 33022&quot;);
+});
+
</ins><span class="cx"> module(&quot;BuildBotQueueView&quot;, {
</span><span class="cx">     setup: function() {
</span><span class="cx">         this.trac = new MockTrac();
</span><span class="lines">@@ -113,6 +147,31 @@
</span><span class="cx">     strictEqual(nodeList.length, 1, &quot;has 1 pending commit&quot;);
</span><span class="cx"> });
</span><span class="cx"> 
</span><ins>+test(&quot;_presentPopoverForPendingCommits no pending commits&quot;, function()
+{
+    this.someOtherBranch = {
+        name: &quot;someOtherBranch&quot;,
+        repository: {
+            name: &quot;openSource&quot;,
+            trac: this.trac,
+            isSVN: true,
+        }
+    };
+    this.queue.branches = [this.someOtherBranch];
+    this.view._latestProductiveIteration = function(queue)
+    {
+        var iteration = {
+            revision: { &quot;openSource&quot;: 33021 },
+        };
+        return iteration;
+    }
+    var element = document.createElement(&quot;div&quot;);
+    var popover = new Dashboard.Popover();
+    this.view._presentPopoverForPendingCommits(element, popover, this.queue);
+    var nodeList = popover._element.getElementsByClassName(&quot;pending-commit&quot;);
+    strictEqual(nodeList.length, 0, &quot;has 0 pending commits&quot;);
+});
+
</ins><span class="cx"> test(&quot;_presentPopoverForRevisionRange&quot;, function()
</span><span class="cx"> {
</span><span class="cx">     var element = document.createElement(&quot;div&quot;);
</span><span class="lines">@@ -191,12 +250,13 @@
</span><span class="cx"> 
</span><span class="cx"> module(&quot;BuildBotQueue&quot;, {
</span><span class="cx">     setup: function() {
</span><ins>+        Dashboard.Repository.OpenSource.trac = new MockTrac();
+        Dashboard.Repository.OpenSource.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+        Dashboard.Repository.Internal.trac = new MockTrac();
</ins><span class="cx">         this.queue = new MockBuildbotQueue();
</span><span class="cx">         this.queue.branches = [{
</span><span class="cx">             name: &quot;trunk&quot;,
</span><del>-            repository: {
-                name: &quot;openSource&quot;,
-            }
</del><ins>+            repository: Dashboard.Repository.Opensource
</ins><span class="cx">         }];
</span><span class="cx">     }
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (196401 => 196402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-02-11 00:10:52 UTC (rev 196401)
+++ trunk/Tools/ChangeLog        2016-02-11 00:29:24 UTC (rev 196402)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2016-02-10  Jason Marcell  &lt;jmarcell@apple.com&gt;
+
+        Teach dashboard code to compare non-integer revisions
+        https://bugs.webkit.org/show_bug.cgi?id=152345
+
+        Reviewed by Daniel Bates.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
+        (BuildbotQueue.prototype.compareIterationsByRevisions): Compare non-integer revisions.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
+        (BuildbotQueueView.prototype._appendPendingRevisionCount): Use Trac.indexOfRevision in order to compare non-integer
+        revisions. Also uses new Trac.commitsOnBranchLaterThanRevision method.
+        (BuildbotQueueView.prototype._popoverLinesForCommitRange): Ditto.
+        (BuildbotQueueView.prototype._presentPopoverForPendingCommits): Use Trac.indexOfRevision in order to compare non-integer
+        revisions. Also uses new Trac.nextRevision method to calculate a revision range.
+        (BuildbotQueueView.prototype._revisionContentWithPopoverForIteration): Ditto.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:
+        (Trac.prototype._commitsOnBranch): Renamed this to indicate that it should be a private method used by the latter two new
+        methods.
+        (Trac.prototype.commitsOnBranchLaterThanRevision): Finds revisions on a branch later than the specified revision.
+        (Trac.prototype.commitsOnBranchInRevisionRange): Finds revisions on a branch within a specified range.
+        (Trac.prototype.nextRevision): Finds the next revision after a given revision on a specific branch.
+        (Trac.prototype.indexOfRevision): Finds the index of a given revision within the recordedCommits array.
+        (Trac.prototype.commitsOnBranch): Deleted. Renamed to _commitsOnBranch.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js: Added unit tests.
+
</ins><span class="cx"> 2016-02-09  Nan Wang  &lt;n_wang@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: Implement word related text marker functions using TextIterator
</span></span></pre>
</div>
</div>

</body>
</html>