Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 #Copyright 2016 The Chromium Authors. All rights reserved. |
|
chanli
2016/11/08 01:56:20
Nit: a space before "Copyright"
Sharu Jiang
2016/11/11 00:29:05
Done.
| |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Parse output of local git commands into Gitile response format.""" | 5 """Parse output of local git commands into Gitile response format.""" |
| 6 | 6 |
| 7 from collections import defaultdict | 7 from collections import defaultdict |
| 8 from datetime import datetime | 8 from datetime import datetime |
| 9 import re | 9 import re |
| 10 | 10 |
| 11 from lib import time_util | 11 from lib import time_util |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 395 } | 395 } |
| 396 """ | 396 """ |
| 397 return output if output else None | 397 return output if output else None |
| 398 | 398 |
| 399 | 399 |
| 400 class GitSourceParser(GitParser): | 400 class GitSourceParser(GitParser): |
| 401 | 401 |
| 402 def __call__(self, output): | 402 def __call__(self, output): |
| 403 """Returns the raw text of a file source from 'git show <rev>:<file>'.""" | 403 """Returns the raw text of a file source from 'git show <rev>:<file>'.""" |
| 404 return output if output else None | 404 return output if output else None |
| OLD | NEW |