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) { | |
ojan
2014/07/19 02:02:57
This is a hugely simplified from svn-log.js. I did
abarth-chromium
2014/07/21 06:36:27
That's fine.
| |
9 this.author = author; | |
10 this.message = message.trim(); | |
abarth-chromium
2014/07/21 06:36:27
I see, we do the trimming in different layers...
ojan
2014/07/21 19:58:04
Fixed.
| |
11 this.revision = this._findRevision(); | |
michaelpg
2014/07/21 07:28:48
this._findRevision(this.message)?
ojan
2014/07/21 19:58:04
Whoops. I forgot to remove the message argument to
| |
12 this.summary = this.message.split('\n')[0]; | |
michaelpg
2014/07/21 07:28:48
Are these messages always reasonable sizes or migh
ojan
2014/07/21 19:58:04
They're whatever size the commit description is. T
| |
13 } | |
14 | |
15 CTCommit.prototype._findRevision = function(message) { | |
16 var regexp = /git-svn-id: svn:\/\/svn.chromium.org\/blink\/trunk@(\d+)/; | |
abarth-chromium
2014/07/21 06:36:27
This isn't very general...
ojan
2014/07/21 19:58:04
Didn't even notice this. Copy-pasta from the old c
| |
17 var match = regexp.exec(this.message); | |
18 if (match) | |
19 return parseInt(match[1], 10); | |
20 return null; | |
21 } | |
22 </script> | |
OLD | NEW |