<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Teach dashboard code to compare non-integer revisions."
   href="https://bugs.webkit.org/show_bug.cgi?id=152345#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Teach dashboard code to compare non-integer revisions."
   href="https://bugs.webkit.org/show_bug.cgi?id=152345">bug 152345</a>
              from <span class="vcard"><a class="email" href="mailto:dbates&#64;webkit.org" title="Daniel Bates &lt;dbates&#64;webkit.org&gt;"> <span class="fn">Daniel Bates</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=267593&amp;action=diff" name="attach_267593" title="Patch">attachment 267593</a> <a href="attachment.cgi?id=267593&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=267593&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=267593&amp;action=review</a>

<span class="quote">&gt; Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:276
&gt; -            var result = b.revision[repositoryName] - a.revision[repositoryName];
&gt; +            var trac = sortedRepositories[i].trac;
&gt; +            if (!trac || b.revision[repositoryName] === undefined || a.revision[repositoryName] === undefined)
&gt; +                return undefined;</span >

Can you give an example where we would not have a revision for a repository?

<span class="quote">&gt; Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:298
&gt; +            var trac = sortedRepositories[i].trac;
&gt; +            if (!trac || b.revision[repositoryName] === undefined || a.revision[repositoryName] === undefined)
&gt; +                return undefined;
&gt; +            var result = trac.compareRevisions(b.revision[repositoryName], a.revision[repositoryName]);</span >

Ditto.

<span class="quote">&gt; Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:95
&gt; +            if (!trac.latestRecordedRevisionNumber || comparison === undefined || comparison &gt; 0) {</span >

Can you give an example when comparison === undefined?

<span class="quote">&gt; Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:100
&gt; +            totalRevisionsBehind += trac.commitsOnBranch(branch.name, function(commit, index, arr) { return index &gt; arr.objectIndexOf(latestProductiveRevisionNumber, &quot;revisionNumber&quot;); }).length;</span >

The name arr is not a good name for the array of commits. I am assuming arr is short for &quot;array&quot;. Regardless, neither &quot;arr&quot; nor &quot;array&quot; are good names because the former is an abbreviation of the latter (and I do not find it more canonical than the word &quot;array&quot;) and the latter is a generic term that does not convey anything about the contents of the array. Maybe a better name would be commits or allCommits?

<span class="quote">&gt; Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:145
&gt; +        var commits = trac.commitsOnBranch(branch.name, function(commit, index, arr) { return index &gt;= arr.objectIndexOf(firstRevisionNumber, &quot;revisionNumber&quot;) &amp;&amp; index &lt;= arr.objectIndexOf(lastRevisionNumber, &quot;revisionNumber&quot;); });</span >

Ditto.

<span class="quote">&gt; Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:68
&gt; +        return this.recordedCommits.filter(function(commit, index, arr) {</span >

Ditto.

<span class="quote">&gt; Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:266
&gt; +        var indexA = this.recordedCommits.objectIndexOf(a, &quot;revisionNumber&quot;);
&gt; +        var indexB = this.recordedCommits.objectIndexOf(b, &quot;revisionNumber&quot;);</span >

Can you elaborate on when a commit would not have a revision?

<span class="quote">&gt; Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:269
&gt; +            this.loadMoreHistoricalData();
&gt; +            return undefined;</span >

This does not seem like the correct approach. Having a comparison function fetch more data and have a polymorphic return type is weird.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>