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

Side by Side Diff: tools/findit/git_repository_parser.py

Issue 504443004: [Findit] Improve output format and cherry-pick bugs fix. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit. Created 6 years, 3 months 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 (c) 2014 The Chromium Authors. All rights reserved. 1 # Copyright (c) 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 import xml.dom.minidom as minidom 6 import xml.dom.minidom as minidom
7 from xml.parsers.expat import ExpatError 7 from xml.parsers.expat import ExpatError
8 8
9 import crash_utils 9 import crash_utils
10 from repository_parser_interface import ParserInterface 10 from repository_parser_interface import ParserInterface
11 11
12 FILE_CHANGE_TYPE_MAP = { 12 FILE_CHANGE_TYPE_MAP = {
13 'add': 'A', 13 'add': 'A',
14 'delete': 'D', 14 'delete': 'D',
15 'modify': 'M' 15 'modify': 'M',
16 'rename': 'R'
16 } 17 }
aarya 2014/08/26 02:13:53 I fixed this by guess. I was crashing in rename ke
stgao 2014/08/26 18:35:24 I will check this after lunch.
17 18
18 19
19 class GitParser(ParserInterface): 20 class GitParser(ParserInterface):
20 """Parser for Git repository in googlesource. 21 """Parser for Git repository in googlesource.
21 22
22 Attributes: 23 Attributes:
23 parsed_deps: A map from component path to its repository name, regression, 24 parsed_deps: A map from component path to its repository name, regression,
24 etc. 25 etc.
25 url_parts_map: A map from url type to its url parts. This parts are added 26 url_parts_map: A map from url type to its url parts. This parts are added
26 the base url to form different urls. 27 the base url to form different urls.
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 revision_url = base_url + revision_url_parts 273 revision_url = base_url + revision_url_parts
273 # TODO(jeun): Add a way to get content from JSON object. 274 # TODO(jeun): Add a way to get content from JSON object.
274 content = None 275 content = None
275 276
276 (revision_info, _) = self.ParseChangelog(component, revision, revision) 277 (revision_info, _) = self.ParseChangelog(component, revision, revision)
277 message = revision_info[revision]['message'] 278 message = revision_info[revision]['message']
278 return (content, revision, author, revision_url, message) 279 return (content, revision, author, revision_url, message)
279 280
280 # Return none if the region does not exist. 281 # Return none if the region does not exist.
281 return None 282 return None
OLDNEW
« tools/findit/common/utils.py ('K') | « tools/findit/findit_for_crash.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698