[Webkit-unassigned] [Bug 147796] Refactor BuildbotQueueView.revisionContentForIteration to work more generically with repositories other than "openSource" and "internal".
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 7 16:02:44 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=147796
Daniel Bates <dbates at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #258537|review?, commit-queue? |review-, commit-queue-
Flags| |
--- Comment #2 from Daniel Bates <dbates at webkit.org> ---
Comment on attachment 258537
--> https://bugs.webkit.org/attachment.cgi?id=258537
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=258537&action=review
> 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;
> + }
> + }
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);
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150807/3b7583a9/attachment-0001.html>
More information about the webkit-unassigned
mailing list