Chromium Code Reviews| Index: Tools/GardeningServer/model/ct-commit.html |
| diff --git a/Tools/GardeningServer/model/ct-commit.html b/Tools/GardeningServer/model/ct-commit.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f23e821404997b68e2e2c47c9c108b8c362d88c9 |
| --- /dev/null |
| +++ b/Tools/GardeningServer/model/ct-commit.html |
| @@ -0,0 +1,22 @@ |
| +<!-- |
| +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(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.
|
| + this.author = author; |
| + 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.
|
| + 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
|
| + 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
|
| +} |
| + |
| +CTCommit.prototype._findRevision = function(message) { |
| + 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
|
| + var match = regexp.exec(this.message); |
| + if (match) |
| + return parseInt(match[1], 10); |
| + return null; |
| +} |
| +</script> |