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

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

Issue 410483002: Add the revision details widget to sheriff-o-matic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Spaces in the curlies! 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
Index: Tools/GardeningServer/model/ct-commit-log.html
diff --git a/Tools/GardeningServer/model/ct-commit-log.html b/Tools/GardeningServer/model/ct-commit-log.html
index eccb55f829c669f46eb94a39b0d3d0d813bb1466..55e359becde53355f64ac862fbb5b93b4487d034 100644
--- a/Tools/GardeningServer/model/ct-commit-log.html
+++ b/Tools/GardeningServer/model/ct-commit-log.html
@@ -12,6 +12,7 @@ found in the LICENSE file.
function CTCommitLog() {
this.commits = {};
this.firstRevision = {};
+ this.lastRevision = {};
this._repositories = new CTRepositories();
}
@@ -36,7 +37,13 @@ CTCommitLog.prototype._handleResponse = function(repositoryUrl, repository, json
this.commits[repository][commit.revision] = commit;
}.bind(this));
- this.firstRevision[repository] = Object.keys(this.commits[repository]).sort()[0];
+ this._findFirstAndLastRevisions(repository);
+}
+
+CTCommitLog.prototype._findFirstAndLastRevisions = function(repository) {
+ var sortedCommits = Object.keys(this.commits[repository]).sort();
+ this.firstRevision[repository] = parseInt(sortedCommits.first());
+ this.lastRevision[repository] = parseInt(sortedCommits.last());
}
CTCommitLog.prototype.range = function(repository, first, last) {
« no previous file with comments | « Tools/GardeningServer/model/ct-builder-revisions-mock.html ('k') | Tools/GardeningServer/model/ct-commit-log-mock.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698