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

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

Issue 498523002: [Sheriff-o-matic] Use likely_revisions instead of first_failing/last_passing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: sort git hashes 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-list.html
diff --git a/Tools/GardeningServer/model/ct-commit-list.html b/Tools/GardeningServer/model/ct-commit-list.html
index 22780e5466562cfbc92e0797a4cbcf172d5e4e20..56d10ea1fba290864ff2fec434e1ed03f3013acd 100644
--- a/Tools/GardeningServer/model/ct-commit-list.html
+++ b/Tools/GardeningServer/model/ct-commit-list.html
@@ -7,57 +7,39 @@ found in the LICENSE file.
<link rel="import" href="ct-commit-log.html">
<script>
-function CTCommitList(group, commits) {
- this.commitLog = commits;
- if (group.failures && group.failures.first()) {
- this.firstFailing = group.failures.first().firstFailingRevisions;
- this.lastPassing = group.failures.first().lastPassingRevisions;
- }
+function CTCommitList(commitLog, revisions) {
+ this.commitLog = commitLog;
+ this._revisions = revisions;
this._updateRepositories();
}
CTCommitList.prototype._updateRepositories = function() {
this.repositories = [];
- if (!this.commitLog || !this.lastPassing || !this.firstFailing)
+ if (!this.commitLog || !this._revisions.length)
return;
var allRepositories = this.commitLog._repositories.names;
for (var i = 0; i < allRepositories.length; i++) {
var repository = allRepositories[i];
- var commits = this._commits(repository);
+ var commits = this._getCommitsForRepo(repository);
if (!commits.length)
continue;
this.repositories.push({
name: repository,
- range: this._range(commits),
+ range: this._displayRange(commits, repository),
commits: commits,
expanded: false
});
}
};
-CTCommitList.prototype._commits = function(repository) {
- var commits = [];
-
- if (!this.firstFailing || !this.lastPassing)
- return [];
-
- var firstFailing = Number(this.firstFailing[repository]);
- var lastPassing = Number(this.lastPassing[repository]);
- if (firstFailing == lastPassing)
- return commits;
-
- if (lastPassing > firstFailing) {
- console.warn('Revision range is backwards, which is invalid:', lastPassing, firstFailing);
- return commits;
- }
-
- return this.commitLog.range(repository, lastPassing + 1, firstFailing);
-};
+CTCommitList.prototype._getCommitsForRepo = function(repository) {
ojan 2014/08/23 01:23:05 Nit: What was wrong with the old name?
Mathieu 2014/08/24 23:42:10 As a new comer to the project it initially confuse
+ return this.commitLog.range(repository, this._revisions);
+}
-CTCommitList.prototype._range = function(commits) {
+CTCommitList.prototype._displayRange = function(commits) {
return commits.first().revision + " : " + commits.last().revision;
};
« no previous file with comments | « no previous file | Tools/GardeningServer/model/ct-commit-list-mock.html » ('j') | Tools/GardeningServer/model/ct-commit-log.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698