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

Unified Diff: Tools/GardeningServer/model/ct-commit.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Tools/GardeningServer/model/ct-builder-status.html ('k') | Tools/GardeningServer/model/ct-commit-list.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/model/ct-commit.html
diff --git a/Tools/GardeningServer/model/ct-commit.html b/Tools/GardeningServer/model/ct-commit.html
deleted file mode 100644
index 486d16e26c5d6a06785d49f77590b8e3bd206dde..0000000000000000000000000000000000000000
--- a/Tools/GardeningServer/model/ct-commit.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!--
-Copyright 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<script>
-function CTCommit() {}
-
-CTCommit.create = function(author, message, baseUrl, repository) {
- var commit = new CTCommit();
- var revision = CTCommit.findRevision(message);
- commit.complete(author, message, revision);
- commit.url = commit._url(baseUrl);
- commit.repository = repository;
- return commit;
-}
-
-// This is for cases where we can't get the commit data off the
-// repository for some reason.
-CTCommit.createIncomplete = function(baseUrl, revision, repository) {
- var commit = new CTCommit();
- commit.revision = revision;
- commit.url = commit._url(baseUrl);
- commit.repository = repository;
- return commit;
-}
-
-CTCommit.findRevision = function(message) {
- var svnRegexp = /^git-svn-id:[^@]*@(\d+).*$/m;
- var gitRegexp = /^Cr-Commit-Position\:\ refs\/heads\/master@\{#(\d+)\}.*$/m;
-
- var match = svnRegexp.exec(message);
- if (!match)
- match = gitRegexp.exec(message);
-
- if (match)
- return parseInt(match[1], 10);
- return null;
-}
-
-CTCommit.prototype.complete = function(author, message, revision) {
- this.author = author;
- this.message = message;
- this.revision = revision;
- this.summary = this._findSummary();
- this.isComplete = true;
-}
-
-CTCommit.prototype._url = function(baseUrl) {
- return baseUrl.assign({revision: this.revision});
-}
-
-CTCommit.prototype._findSummary = function() {
- var index = this.message.indexOf('\n');
- return this.message.substring(0, index);
-}
-</script>
« no previous file with comments | « Tools/GardeningServer/model/ct-builder-status.html ('k') | Tools/GardeningServer/model/ct-commit-list.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698