OLD | NEW |
(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 <script> |
| 8 function CTCommit(author, message) { |
| 9 this.author = author; |
| 10 this.message = message; |
| 11 this.revision = this._findRevision(); |
| 12 // FIXME: This is a needlessly expensive way to grab the first line. |
| 13 this.summary = this.message.split('\n')[0]; |
| 14 } |
| 15 |
| 16 CTCommit.prototype._findRevision = function() { |
| 17 // FIXME: Make this regexp more general. |
| 18 var regexp = /git-svn-id: svn:\/\/svn.chromium.org\/blink\/trunk@(\d+)/; |
| 19 var match = regexp.exec(this.message); |
| 20 if (match) |
| 21 return parseInt(match[1], 10); |
| 22 return null; |
| 23 } |
| 24 </script> |
OLD | NEW |