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

Side by Side Diff: appengine/findit/crash/changelist_classifier.py

Issue 2432203003: [Predator] Run predator. (Closed)
Patch Set: Rebase. Created 4 years, 1 month 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
« no previous file with comments | « no previous file | appengine/findit/crash/crash_pipeline.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 logging 5 import logging
6 from collections import defaultdict 6 from collections import defaultdict
7 7
8 from common import chrome_dependency_fetcher 8 from common import chrome_dependency_fetcher
9 from crash import crash_util 9 from crash import crash_util
10 from crash.results import MatchResults 10 from crash.results import MatchResults
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 repository (Repository): Repository to get changelogs and blame from. 285 repository (Repository): Repository to get changelogs and blame from.
286 ignore_cls (set): Set of reverted revisions. 286 ignore_cls (set): Set of reverted revisions.
287 287
288 Returns: 288 Returns:
289 A list of MatchResult instances with confidence and reason unset. 289 A list of MatchResult instances with confidence and reason unset.
290 """ 290 """
291 match_results = MatchResults(ignore_cls) 291 match_results = MatchResults(ignore_cls)
292 292
293 for dep, file_to_stack_infos in dep_to_file_to_stack_infos.iteritems(): 293 for dep, file_to_stack_infos in dep_to_file_to_stack_infos.iteritems():
294 file_to_changelogs = dep_to_file_to_changelogs[dep] 294 file_to_changelogs = dep_to_file_to_changelogs[dep]
295 repository.repo_url = stack_deps[dep].repo_url
296 295
297 for crashed_file_path, stack_infos in file_to_stack_infos.iteritems(): 296 for crashed_file_path, stack_infos in file_to_stack_infos.iteritems():
298 for touched_file_path, changelogs in file_to_changelogs.iteritems(): 297 for touched_file_path, changelogs in file_to_changelogs.iteritems():
299 if not crash_util.IsSameFilePath(crashed_file_path, touched_file_path): 298 if not crash_util.IsSameFilePath(crashed_file_path, touched_file_path):
300 continue 299 continue
301 300
301 repository.repo_url = stack_deps[dep].repo_url
302 blame = repository.GetBlame(touched_file_path, 302 blame = repository.GetBlame(touched_file_path,
303 stack_deps[dep].revision) 303 stack_deps[dep].revision)
304 304
305 # Generate/update each result(changelog) in changelogs, blame is used 305 # Generate/update each result(changelog) in changelogs, blame is used
306 # to calculate distance between touched lines and crashed lines in file. 306 # to calculate distance between touched lines and crashed lines in file.
307 match_results.GenerateMatchResults( 307 match_results.GenerateMatchResults(
308 touched_file_path, dep, stack_infos, changelogs, blame) 308 touched_file_path, dep, stack_infos, changelogs, blame)
309 309
310 return match_results.values() 310 return match_results.values()
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/crash/crash_pipeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698