Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: Tools/GardeningServer/model/ct-commit-list.html

Issue 485253004: [Sheriff-o-matic] Remove race condition on the commit list. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: names Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Tools/GardeningServer/model/ct-commit.html ('k') | Tools/GardeningServer/model/ct-commit-list-mock.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/model/ct-commit-list.html
diff --git a/Tools/GardeningServer/model/ct-commit-list.html b/Tools/GardeningServer/model/ct-commit-list.html
index 6b8b2560202953da8534d68c4fbca3699dced10d..22780e5466562cfbc92e0797a4cbcf172d5e4e20 100644
--- a/Tools/GardeningServer/model/ct-commit-list.html
+++ b/Tools/GardeningServer/model/ct-commit-list.html
@@ -8,19 +8,20 @@ found in the LICENSE file.
<script>
function CTCommitList(group, commits) {
- this.revisionLog = commits;
+ this.commitLog = commits;
if (group.failures && group.failures.first()) {
this.firstFailing = group.failures.first().firstFailingRevisions;
this.lastPassing = group.failures.first().lastPassingRevisions;
}
+ this._updateRepositories();
}
-CTCommitList.prototype.repositories = function() {
- var ret = [];
- if (!this.revisionLog || !this.lastPassing || !this.firstFailing)
- return ret;
+CTCommitList.prototype._updateRepositories = function() {
+ this.repositories = [];
+ if (!this.commitLog || !this.lastPassing || !this.firstFailing)
+ return;
- var allRepositories = Object.keys(this.revisionLog.commits).sort();
+ var allRepositories = this.commitLog._repositories.names;
for (var i = 0; i < allRepositories.length; i++) {
var repository = allRepositories[i];
@@ -28,14 +29,13 @@ CTCommitList.prototype.repositories = function() {
if (!commits.length)
continue;
- ret.push({
+ this.repositories.push({
name: repository,
range: this._range(commits),
commits: commits,
expanded: false
});
}
- return ret;
};
CTCommitList.prototype._commits = function(repository) {
@@ -54,7 +54,7 @@ CTCommitList.prototype._commits = function(repository) {
return commits;
}
- return this.revisionLog.range(repository, lastPassing + 1, firstFailing);
+ return this.commitLog.range(repository, lastPassing + 1, firstFailing);
};
CTCommitList.prototype._range = function(commits) {
« no previous file with comments | « Tools/GardeningServer/model/ct-commit.html ('k') | Tools/GardeningServer/model/ct-commit-list-mock.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698