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

Side by Side Diff: appengine/findit/handlers/help_triage.py

Issue 2344443005: [Findit] Factoring the gitiles (etc) stuff out into its own directory (Closed)
Patch Set: reverted unintended change to an __init__ file 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
OLDNEW
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 common.base_handler import BaseHandler 5 from lib.gitiles.gitiles_repository import GitilesRepository
stgao 2016/10/28 18:21:00 order of import.
wrengr 2016/10/28 19:24:48 Done.
6 from common.base_handler import Permission 6 from common.base_handler import BaseHandler, Permission
7 from common.git_repository import GitRepository
8 from common.http_client_appengine import HttpClientAppengine as HttpClient 7 from common.http_client_appengine import HttpClientAppengine as HttpClient
9 from model.wf_analysis import WfAnalysis 8 from model.wf_analysis import WfAnalysis
10 from waterfall import buildbot 9 from waterfall import buildbot
11 from waterfall import build_util 10 from waterfall import build_util
12 11
13 12
14 def _GetFirstFailedBuild(master_name, builder_name, build_number): 13 def _GetFirstFailedBuild(master_name, builder_name, build_number):
15 """Checks failed_steps for current_build and finds the first failed build.""" 14 """Checks failed_steps for current_build and finds the first failed build."""
16 analysis = WfAnalysis.Get(master_name, builder_name, build_number) 15 analysis = WfAnalysis.Get(master_name, builder_name, build_number)
17 if not analysis or not analysis.result['failures']: 16 if not analysis or not analysis.result['failures']:
(...skipping 13 matching lines...) Expand all
31 30
32 31
33 def _AllFailedStepsPassed(passed_steps, current_failed_steps): 32 def _AllFailedStepsPassed(passed_steps, current_failed_steps):
34 for current_failed_step in current_failed_steps: 33 for current_failed_step in current_failed_steps:
35 if current_failed_step not in passed_steps: 34 if current_failed_step not in passed_steps:
36 return False 35 return False
37 return True 36 return True
38 37
39 def GetPossibleRevertInfoFromRevision(revision): 38 def GetPossibleRevertInfoFromRevision(revision):
40 """Parse message to get information of reverting and reverted cls.""" 39 """Parse message to get information of reverting and reverted cls."""
41 git_repo = GitRepository('https://chromium.googlesource.com/chromium/src.git', 40 git_repo = GitilesRepository(
42 HttpClient()) 41 'https://chromium.googlesource.com/chromium/src.git', HttpClient())
43 change_log = git_repo.GetChangeLog(revision) 42 change_log = git_repo.GetChangeLog(revision)
44 if not change_log: # pragma: no cover 43 if not change_log: # pragma: no cover
45 return {} 44 return {}
46 45
47 reverted_revision = change_log.reverted_revision 46 reverted_revision = change_log.reverted_revision
48 if not reverted_revision: 47 if not reverted_revision:
49 return {} 48 return {}
50 49
51 reverted_cl_change_log = git_repo.GetChangeLog(reverted_revision) 50 reverted_cl_change_log = git_repo.GetChangeLog(reverted_revision)
52 51
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 """ 158 """
160 url = self.request.get('url').strip() 159 url = self.request.get('url').strip()
161 build_keys = buildbot.ParseBuildUrl(url) 160 build_keys = buildbot.ParseBuildUrl(url)
162 161
163 if not build_keys: # pragma: no cover 162 if not build_keys: # pragma: no cover
164 return {'data': {}} 163 return {'data': {}}
165 164
166 data = _CheckReverts(*build_keys) 165 data = _CheckReverts(*build_keys)
167 166
168 return {'data': data} 167 return {'data': data}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698