yocto_console_view: Merge all unresolved revisions into one entry

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2020-11-29 11:52:32 +00:00
parent 8d95b24b8b
commit c31ca19a34

View File

@ -182,8 +182,8 @@ class Console {
this.sortBuildersByTags(this.all_builders); this.sortBuildersByTags(this.all_builders);
if (this.changesBySSID == null) { this.changesBySSID = {}; } this.changesBySSID = {};
if (this.changesByRevision == null) { this.changesByRevision = {}; } this.changesByRevision = {};
for (change of Array.from(this.changes)) { for (change of Array.from(this.changes)) {
this.changesBySSID[change.sourcestamp.ssid] = change; this.changesBySSID[change.sourcestamp.ssid] = change;
this.changesByRevision[change.revision] = change; this.changesByRevision[change.revision] = change;
@ -414,12 +414,6 @@ class Console {
if ((change == null)) { if ((change == null)) {
change = this.makeFakeChange(rev, build.started_at, rev); change = this.makeFakeChange(rev, build.started_at, rev);
} }
if ((buildset != null) && (buildset.parent_buildid != null)) {
oldrev = `Unresolved ${buildset.parent_buildid}`;
delete this.changesBySSID[oldrev];
}
oldrev = `Unresolved ${build.builderid}-${build.buildid}`;
delete this.changesBySSID[oldrev];
change.caption = "Commit"; change.caption = "Commit";
if ((build.properties != null ? build.properties.yp_build_branch : undefined) != null) { if ((build.properties != null ? build.properties.yp_build_branch : undefined) != null) {
@ -442,28 +436,15 @@ class Console {
change.reason = build.properties.reason[0]; change.reason = build.properties.reason[0];
} }
} else { } else {
if ((buildset != null) && (buildset.parent_buildid != null)) { rev = `Unresolved Revision`;
rev = `Unresolved ${buildset.parent_buildid}`;
if ((change == null)) {
change = this.changesBySSID[rev];
}
if ((change == null)) {
oldrev = `Unresolved ${build.builderid}-${build.buildid}`;
delete this.changesBySSID[oldrev];
change = this.makeFakeChange(rev, build.started_at, rev);
}
}
if ((change == null)) {
rev = `Unresolved ${build.builderid}-${build.buildid}`;
if ((change == null)) { if ((change == null)) {
change = this.changesBySSID[rev]; change = this.changesBySSID[rev];
} }
if ((change == null)) { if ((change == null)) {
change = this.makeFakeChange(rev, build.started_at, rev); change = this.makeFakeChange(rev, build.started_at, rev);
}
}
change.caption = rev; change.caption = rev;
} }
}
if (change.buildersById[build.builderid].builds.indexOf(build) == -1) { if (change.buildersById[build.builderid].builds.indexOf(build) == -1) {
change.buildersById[build.builderid].builds.push(build); change.buildersById[build.builderid].builds.push(build);