<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><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> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Refactor BuildbotQueueView._presentPopoverForPendingCommits to work more generically with repositories other than "openSource" and "internal"."
href="https://bugs.webkit.org/show_bug.cgi?id=147961">bug 147961</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #259046 Flags</td>
<td>review?, commit-queue?
</td>
<td>review-, commit-queue-
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Refactor BuildbotQueueView._presentPopoverForPendingCommits to work more generically with repositories other than "openSource" and "internal"."
href="https://bugs.webkit.org/show_bug.cgi?id=147961#c11">Comment # 11</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Refactor BuildbotQueueView._presentPopoverForPendingCommits to work more generically with repositories other than "openSource" and "internal"."
href="https://bugs.webkit.org/show_bug.cgi?id=147961">bug 147961</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=259046&action=diff" name="attach_259046" title="Patch">attachment 259046</a> <a href="attachment.cgi?id=259046&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=259046&action=review">https://bugs.webkit.org/attachment.cgi?id=259046&action=review</a>
<span class="quote">> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:177
> + var shouldAddDivider = false;
> + var sortedRepositories = Dashboard.sortedRepositories;
> + for (var i = 0; i < sortedRepositories.length; i++) {
> + var repository = sortedRepositories[i];
> + var trac = repository.trac;
> + var repositoryName = repository.name;
> + var latestProductiveRevisionNumber = latestProductiveIteration.revision[repositoryName];
> + var lines = [];
> + if (latestProductiveRevisionNumber && trac.latestRecordedRevisionNumber) {
> + if (shouldAddDivider) {
> + this._addDividerToPopover(content);
> + shouldAddDivider = false;
> + }
> +
> + lines = this._popoverLinesForCommitRange(trac, queue.branch[repositoryName], latestProductiveRevisionNumber + 1, trac.latestRecordedRevisionNumber);
> + for (var i = 0; i != lines.length; ++i)
> + content.appendChild(lines[i]);
> +
> + if (lines.length)
> + shouldAddDivider = true;
> + }
> + }</span >
This is not correct. Suppose there are three repositories A, B and when processing these repositories (in this order) lines.length = 1, 0, respectively. Then the output content will look like A_1, "divider". But it should be A_1.
Maybe something like this will work:
var shouldAddDivider = false;
var sortedRepositories = Dashboard.sortedRepositories;
for (var i = 0; i < sortedRepositories.length; ++i) {
var repository = sortedRepositories[i];
var trac = repository.trac;
var repositoryName = repository.name;
var latestProductiveRevisionNumber = latestProductiveIteration.revision[repositoryName];
if (!latestProductiveRevisionNumber || !trac.latestRecordedRevisionNumber)
continue;
var lines = this._popoverLinesForCommitRange(trac, queue.branch[repositoryName], latestProductiveRevisionNumber + 1, trac.latestRecordedRevisionNumber);
var length = lines.length;
if (length && shouldAddDivider)
this._addDividerToPopover(content);
for (var i = 0; i < length; ++i)
content.appendChild(lines[i]);
shouldAddDivider = shouldAddDivider || length > 0;
}</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>