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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline.py

Issue 2801393002: Remove remaining references to SVN. (Closed)
Patch Set: Remove unnecessary test Created 3 years, 8 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 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 """A command to download new baselines for NeedsRebaseline tests. 5 """A command to download new baselines for NeedsRebaseline tests.
6 6
7 This command checks the list of tests with NeedsRebaseline expectations, 7 This command checks the list of tests with NeedsRebaseline expectations,
8 and downloads the latest baselines for those tests from the results archived 8 and downloads the latest baselines for those tests from the results archived
9 by the continuous builders. 9 by the continuous builders.
10 """ 10 """
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 blink_tree_status_url = 'http://chromium-status.appspot.com/status' 195 blink_tree_status_url = 'http://chromium-status.appspot.com/status'
196 status = urllib2.urlopen(blink_tree_status_url).read().lower() 196 status = urllib2.urlopen(blink_tree_status_url).read().lower()
197 if 'closed' in status or status == '0': 197 if 'closed' in status or status == '0':
198 return 'closed' 198 return 'closed'
199 elif 'open' in status or status == '1': 199 elif 'open' in status or status == '1':
200 return 'open' 200 return 'open'
201 return 'unknown' 201 return 'unknown'
202 202
203 def execute(self, options, args, tool): 203 def execute(self, options, args, tool):
204 self._tool = tool 204 self._tool = tool
205 if tool.git().executable_name == 'svn':
206 _log.error('Auto rebaseline only works with a git checkout.')
207 return
208 205
209 if not options.dry_run and tool.git().has_working_directory_changes(): 206 if not options.dry_run and tool.git().has_working_directory_changes():
210 _log.error('Cannot proceed with working directory changes. Clean wor king directory first.') 207 _log.error('Cannot proceed with working directory changes. Clean wor king directory first.')
211 return 208 return
212 209
213 revision_data = self.bot_revision_data(tool.git()) 210 revision_data = self.bot_revision_data(tool.git())
214 if not revision_data: 211 if not revision_data:
215 return 212 return
216 213
217 min_revision = int(min([item['revision'] for item in revision_data])) 214 min_revision = int(min([item['revision'] for item in revision_data]))
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 issue_already_closed = tool.executive.run_command( 277 issue_already_closed = tool.executive.run_command(
281 ['git', 'config', 'branch.%s.rietveldissue' % rebaseline _branch_name], 278 ['git', 'config', 'branch.%s.rietveldissue' % rebaseline _branch_name],
282 return_exit_code=True) 279 return_exit_code=True)
283 if not issue_already_closed: 280 if not issue_already_closed:
284 self._run_git_cl_command(options, ['set_close']) 281 self._run_git_cl_command(options, ['set_close'])
285 282
286 tool.git().ensure_cleanly_tracking_remote_master() 283 tool.git().ensure_cleanly_tracking_remote_master()
287 if old_branch_name_or_ref: 284 if old_branch_name_or_ref:
288 tool.git().checkout_branch(old_branch_name_or_ref) 285 tool.git().checkout_branch(old_branch_name_or_ref)
289 tool.git().delete_branch(rebaseline_branch_name) 286 tool.git().delete_branch(rebaseline_branch_name)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698