| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 from collections import defaultdict | 5 from collections import defaultdict |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 | 8 |
| 9 from common.http_client_appengine import HttpClientAppengine as HttpClient | 9 from common.http_client_appengine import HttpClientAppengine as HttpClient |
| 10 from lib.gitiles.diff import ChangeType | |
| 11 from gae_libs.gitiles.cached_gitiles_repository import CachedGitilesRepository | 10 from gae_libs.gitiles.cached_gitiles_repository import CachedGitilesRepository |
| 11 from libs.gitiles.diff import ChangeType |
| 12 from waterfall.failure_signal import FailureSignal | 12 from waterfall.failure_signal import FailureSignal |
| 13 from waterfall import waterfall_config | 13 from waterfall import waterfall_config |
| 14 | 14 |
| 15 | 15 |
| 16 def _IsSameFile(changed_src_file_path, file_path_in_log): | 16 def _IsSameFile(changed_src_file_path, file_path_in_log): |
| 17 """Guesses if the two files are the same. | 17 """Guesses if the two files are the same. |
| 18 | 18 |
| 19 Args: | 19 Args: |
| 20 changed_src_file_path (str): Full path of a file committed to git repo. | 20 changed_src_file_path (str): Full path of a file committed to git repo. |
| 21 file_path_in_log (str): Path of a file appearing in a failure log. It might | 21 file_path_in_log (str): Path of a file appearing in a failure log. It might |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 _SaveFailureToMap( | 799 _SaveFailureToMap( |
| 800 cl_failure_map, new_suspected_cl_dict, step_name, None, | 800 cl_failure_map, new_suspected_cl_dict, step_name, None, |
| 801 max(justification_dict['hints'].values())) | 801 max(justification_dict['hints'].values())) |
| 802 | 802 |
| 803 # TODO(stgao): sort CLs by score. | 803 # TODO(stgao): sort CLs by score. |
| 804 analysis_result['failures'].append(step_analysis_result) | 804 analysis_result['failures'].append(step_analysis_result) |
| 805 | 805 |
| 806 suspected_cls = _ConvertCLFailureMapToList(cl_failure_map) | 806 suspected_cls = _ConvertCLFailureMapToList(cl_failure_map) |
| 807 | 807 |
| 808 return analysis_result, suspected_cls | 808 return analysis_result, suspected_cls |
| OLD | NEW |