<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#c34">Comment # 34</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@webkit.org" title="Daniel Bates <dbates@webkit.org>"> <span class="fn">Daniel Bates</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=270708&action=diff" name="attach_270708" title="Patch">attachment 270708</a> <a href="attachment.cgi?id=270708&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=270708&action=review">https://bugs.webkit.org/attachment.cgi?id=270708&action=review</a>
<span class="quote">> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:292
> + if (indexA > -1 && indexB > -1) {</span >
This is OK as-is. I suggest explicitly comparing against -1.
<span class="quote">> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:172
> + var nextRevision = trac.nextRevision(branch.name, latestProductiveRevisionNumber);
> + if (!latestProductiveRevisionNumber || !trac.latestRecordedRevisionNumber || !nextRevision)
> continue;</span >
This is very minor. I suggest we compute nextRevision and early return (if necessary) after line 171.
<span class="quote">> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:237
> if (context.firstRevision <= context.lastRevision)</span >
This is incorrect for Git SHAs, which are not numeric.
<span class="quote">> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:96
> + console.assert(indexOfLastRevision !== -1, indexOfLastRevision + " is not in the list of recorded commits");</span >
indexOfLastRevision => lastRevision
<span class="quote">> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:304
> + return undefined;</span >
I suggest either returning null or we may want to define a named constant (it could equal null), maybe Trac.NO_MORE_REVISIONS, if we feel this may improve the readability at the call site.
<span class="quote">> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:310
> + for (var i = 0; i < commits.length; ++i)</span >
Nit: Missing braces. We add braces whenever the body of the control-flow statement is more than one line.
<span class="quote">> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js:167
> + return {
> + revision: {
> + "openSource": 33021
> + }
> + };</span >
This is OK as-is. I would have written this as:
var iteration = {
revision: { "openSource": 33021 },
};
return iteration;</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>