Index: Tools/GardeningServer/model/ct-commit.html |
diff --git a/Tools/GardeningServer/model/ct-commit.html b/Tools/GardeningServer/model/ct-commit.html |
index 098cf7817fbe63cb9c275813172db38ff82e1477..71806e51898468c2b25cea9e8461879322e0b5b2 100644 |
--- a/Tools/GardeningServer/model/ct-commit.html |
+++ b/Tools/GardeningServer/model/ct-commit.html |
@@ -5,14 +5,24 @@ found in the LICENSE file. |
--> |
<script> |
-function CTCommit(author, message) { |
+function CTCommit(author, message, baseUrl) { |
this.author = author; |
this.message = message; |
this.revision = this._findRevision(); |
// FIXME: This is a needlessly expensive way to grab the first line. |
this.summary = this.message.split('\n')[0]; |
+ this._baseUrl = baseUrl; |
} |
+Object.defineProperty(CTCommit.prototype, "url", { |
+ get: function url() { |
+ return this._baseUrl + '?' + Object.toQueryString({ |
+ view: 'rev', |
+ revision: this.revision, |
+ }); |
+ }, |
+}); |
+ |
CTCommit.prototype._findRevision = function() { |
// FIXME: Make this regexp more general. |
var regexp = /git-svn-id: svn:\/\/svn.chromium.org\/blink\/trunk@(\d+)/; |
@@ -21,4 +31,4 @@ CTCommit.prototype._findRevision = function() { |
return parseInt(match[1], 10); |
return null; |
} |
-</script> |
+</script> |