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

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

Issue 728023004: Remove GardeningServer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!--
2 Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file.
5 -->
6
7 <link rel="import" href="ct-commit-log.html">
8 <link rel="import" href="ct-repository-commit-list.html">
9
10 <script>
11 function CTCommitList(commitLog, revisions) {
12 this._initRevisions(revisions);
13 this.update(commitLog);
14 }
15
16 CTCommitList.prototype.update = function(commitLog) {
17 this.repositories = [];
18 if (!commitLog)
19 return;
20
21 var allRepositories = commitLog._repositories.names;
22 for (var i = 0; i < allRepositories.length; i++) {
23 var repository = allRepositories[i];
24 if (!this.revisions[repository])
25 continue;
26
27 var commits = commitLog.range(repository, this.revisions[repository]);
28 if (!commits.length)
29 continue;
30
31 this.repositories.push(new CTRepositoryCommitList(repository, commits));
32 }
33 };
34
35 CTCommitList.prototype._initRevisions = function(repoRevisions) {
36 this.revisions = {};
37 repoRevisions.forEach(function(repoRevision) {
38 var split = repoRevision.split(':');
39 var repo = split[0];
40 var revision = parseInt(split[1], 10);
41 if (revision && repo) {
42 if (!this.revisions[repo]) {
43 this.revisions[repo] = [revision];
44 } else {
45 this.revisions[repo].push(revision);
46 }
47 }
48 }.bind(this));
49 };
50
51 </script>
OLDNEW
« 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