Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: appengine/findit/libs/gitiles/gitiles_repository.py

Issue 2538373003: [Culprit-Finder] Merge lib/ to libs/. (Closed)
Patch Set: . Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 # TODO(http://crbug.com/660466): We should try to break dependencies. 11 # TODO(http://crbug.com/660466): We should try to break dependencies.
12 from lib.cache_decorator import Cached 12 from libs.cache_decorator import Cached
13 from lib.cache_decorator import CompressedMemCacher 13 from libs.cache_decorator import CompressedMemCacher
14 from lib.gitiles import commit_util 14 from libs.gitiles import commit_util
15 from lib.gitiles import diff 15 from libs.gitiles import diff
16 from lib.gitiles.blame import Blame 16 from libs.gitiles.blame import Blame
17 from lib.gitiles.blame import Region 17 from libs.gitiles.blame import Region
18 from lib.gitiles.change_log import ChangeLog 18 from libs.gitiles.change_log import ChangeLog
19 from lib.gitiles.change_log import FileChangeInfo 19 from libs.gitiles.change_log import FileChangeInfo
20 from lib.gitiles.git_repository import GitRepository 20 from libs.gitiles.git_repository import GitRepository
21 from lib.time_util import TimeZoneInfo 21 from libs.time_util import TimeZoneInfo
22 22
23 COMMIT_POSITION_PATTERN = re.compile( 23 COMMIT_POSITION_PATTERN = re.compile(
24 '^Cr-Commit-Position: refs/heads/master@{#(\d+)}$', re.IGNORECASE) 24 '^Cr-Commit-Position: refs/heads/master@{#(\d+)}$', re.IGNORECASE)
25 CODE_REVIEW_URL_PATTERN = re.compile( 25 CODE_REVIEW_URL_PATTERN = re.compile(
26 '^(?:Review URL|Review-Url): (.*\d+).*$', re.IGNORECASE) 26 '^(?:Review URL|Review-Url): (.*\d+).*$', re.IGNORECASE)
27 REVERTED_REVISION_PATTERN = re.compile( 27 REVERTED_REVISION_PATTERN = re.compile(
28 '^> Committed: https://.+/([0-9a-fA-F]{40})$', re.IGNORECASE) 28 '^> Committed: https://.+/([0-9a-fA-F]{40})$', re.IGNORECASE)
29 TIMEZONE_PATTERN = re.compile('[-+]\d{4}$') 29 TIMEZONE_PATTERN = re.compile('[-+]\d{4}$')
30 CACHE_EXPIRE_TIME_SECONDS = 24 * 60 * 60 30 CACHE_EXPIRE_TIME_SECONDS = 24 * 60 * 60
31 31
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 for log in data['log']: 222 for log in data['log']:
223 changelogs.append(self._ParseChangeLogFromLogData(log)) 223 changelogs.append(self._ParseChangeLogFromLogData(log))
224 224
225 if 'next' in data: 225 if 'next' in data:
226 next_end_revision = data['next'] 226 next_end_revision = data['next']
227 else: 227 else:
228 next_end_revision = None 228 next_end_revision = None
229 229
230 return changelogs 230 return changelogs
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698