<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.revisionContentForIteration to work more generically with repositories other than "openSource" and "internal"."
href="https://bugs.webkit.org/show_bug.cgi?id=147796">bug 147796</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 #258537 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.revisionContentForIteration to work more generically with repositories other than "openSource" and "internal"."
href="https://bugs.webkit.org/show_bug.cgi?id=147796#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Refactor BuildbotQueueView.revisionContentForIteration to work more generically with repositories other than "openSource" and "internal"."
href="https://bugs.webkit.org/show_bug.cgi?id=147796">bug 147796</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=258537&action=diff" name="attach_258537" title="Patch">attachment 258537</a> <a href="attachment.cgi?id=258537&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=258537&action=review">https://bugs.webkit.org/attachment.cgi?id=258537&action=review</a>
<span class="quote">> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:276
> + var shouldAddPlusSign = false;
> + var sortedRepositories = Dashboard.sortedRepositories;
> + for (var i = 0; i < sortedRepositories.length; ++i) {
> + var repository = sortedRepositories[i];
> + var content = this._revisionContentWithPopoverForIteration(iteration,
> + previousDisplayedIteration, repository);
> + if (content) {
> + if (shouldAddPlusSign)
> + fragment.appendChild(document.createTextNode(" \uff0b "));
> + fragment.appendChild(content);
> + shouldAddPlusSign = true;
> + }
> + }</span >
This change does not look correct. We are neither passing an instance of the Trac object to _revisionContentWithPopoverForIteration() nor are we passing the name of the repository to _revisionContentWithPopoverForIteration().
Assuming we store a reference to the Trac object in the repository object such that you can access it via sortedRepositories[i].trac for some i in [0, Dashboard.sortedRepositories.length], then I would write this as:
var sortedRepositories = Dashboard.sortedRepositories;
var fragment = document.createDocumentFragment();
fragment.appendChild(this._revisionContentWithPopoverForIteration(iteration, previousDisplayedIteration, sortedRepositories[0].name, sortedRepositories[0].trac));
for (var i = 1; i < sortedRepositories.length; ++i) {
fragment.appendChild(document.createTextNode(" \uff0b "));
fragment.appendChild(this._revisionContentWithPopoverForIteration(iteration, previousDisplayedIteration, sortedRepositories[i].name, sortedRepositories[0].trac));
}
console.assert(fragment.childNodes.length);</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>