| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 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 import base64 | 5 import base64 |
| 6 from datetime import datetime | 6 from datetime import datetime |
| 7 from datetime import timedelta | 7 from datetime import timedelta |
| 8 import json | 8 import json |
| 9 import re | 9 import re |
| 10 | 10 |
| 11 from lib.gitiles import commit_util | 11 from libs.gitiles import commit_util |
| 12 from lib.gitiles import diff | 12 from libs.gitiles import diff |
| 13 from lib.gitiles.blame import Blame | 13 from libs.gitiles.blame import Blame |
| 14 from lib.gitiles.blame import Region | 14 from libs.gitiles.blame import Region |
| 15 from lib.gitiles.change_log import ChangeLog | 15 from libs.gitiles.change_log import ChangeLog |
| 16 from lib.gitiles.change_log import FileChangeInfo | 16 from libs.gitiles.change_log import FileChangeInfo |
| 17 from lib.gitiles.git_repository import GitRepository | 17 from libs.gitiles.git_repository import GitRepository |
| 18 from lib.time_util import TimeZoneInfo | 18 from libs.time_util import TimeZoneInfo |
| 19 | 19 |
| 20 COMMIT_POSITION_PATTERN = re.compile( | 20 COMMIT_POSITION_PATTERN = re.compile( |
| 21 '^Cr-Commit-Position: refs/heads/master@{#(\d+)}$', re.IGNORECASE) | 21 '^Cr-Commit-Position: refs/heads/master@{#(\d+)}$', re.IGNORECASE) |
| 22 CODE_REVIEW_URL_PATTERN = re.compile( | 22 CODE_REVIEW_URL_PATTERN = re.compile( |
| 23 '^(?:Review URL|Review-Url): (.*\d+).*$', re.IGNORECASE) | 23 '^(?:Review URL|Review-Url): (.*\d+).*$', re.IGNORECASE) |
| 24 REVERTED_REVISION_PATTERN = re.compile( | 24 REVERTED_REVISION_PATTERN = re.compile( |
| 25 '^> Committed: https://.+/([0-9a-fA-F]{40})$', re.IGNORECASE) | 25 '^> Committed: https://.+/([0-9a-fA-F]{40})$', re.IGNORECASE) |
| 26 TIMEZONE_PATTERN = re.compile('[-+]\d{4}$') | 26 TIMEZONE_PATTERN = re.compile('[-+]\d{4}$') |
| 27 CACHE_EXPIRE_TIME_SECONDS = 24 * 60 * 60 | 27 CACHE_EXPIRE_TIME_SECONDS = 24 * 60 * 60 |
| 28 | 28 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 215 |
| 216 for log in data['log']: | 216 for log in data['log']: |
| 217 changelogs.append(self._ParseChangeLogFromLogData(log)) | 217 changelogs.append(self._ParseChangeLogFromLogData(log)) |
| 218 | 218 |
| 219 if 'next' in data: | 219 if 'next' in data: |
| 220 next_end_revision = data['next'] | 220 next_end_revision = data['next'] |
| 221 else: | 221 else: |
| 222 next_end_revision = None | 222 next_end_revision = None |
| 223 | 223 |
| 224 return changelogs | 224 return changelogs |
| OLD | NEW |