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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py

Issue 2396433004: Reland of "update SCM and expectations all at once after all commands". (Closed)
Patch Set: Add file to list of files to rm from SCM even if it doesn't exist in SCM. Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/optimize_baselines_unittest.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 (C) 2011, Google Inc. All rights reserved. 1 # Copyright (C) 2011, Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 if self._skip_scm_commands: 244 if self._skip_scm_commands:
245 self._files_to_delete.extend(scm_files) 245 self._files_to_delete.extend(scm_files)
246 else: 246 else:
247 self._scm.delete_list(scm_files) 247 self._scm.delete_list(scm_files)
248 if fs_files: 248 if fs_files:
249 _log.debug(" Deleting (file system):") 249 _log.debug(" Deleting (file system):")
250 for platform_dir in sorted(self._platform(filename) for filename in fs_files): 250 for platform_dir in sorted(self._platform(filename) for filename in fs_files):
251 _log.debug(" " + platform_dir) 251 _log.debug(" " + platform_dir)
252 for filename in fs_files: 252 for filename in fs_files:
253 self._filesystem.remove(filename) 253 self._filesystem.remove(filename)
254 self._files_to_delete.extend(scm_files)
qyearsley 2016/10/04 22:41:37 This is a fix that I think in theory should preven
254 else: 255 else:
255 _log.debug(" (Nothing to delete)") 256 _log.debug(" (Nothing to delete)")
256 257
257 file_names = [] 258 file_names = []
258 for directory, result in new_results_by_directory.items(): 259 for directory, result in new_results_by_directory.items():
259 if results_by_directory.get(directory) != result: 260 if results_by_directory.get(directory) != result:
260 destination = self._join_directory(directory, baseline_name) 261 destination = self._join_directory(directory, baseline_name)
261 self._filesystem.maybe_make_directory(self._filesystem.split(des tination)[0]) 262 self._filesystem.maybe_make_directory(self._filesystem.split(des tination)[0])
262 self._filesystem.write_binary_file(destination, data_for_result[ result]) 263 self._filesystem.write_binary_file(destination, data_for_result[ result])
263 file_names.append(destination) 264 file_names.append(destination)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 result = self._optimize_subtree(baseline_name) 354 result = self._optimize_subtree(baseline_name)
354 non_virtual_baseline_name = self._virtual_base(baseline_name) 355 non_virtual_baseline_name = self._virtual_base(baseline_name)
355 if not non_virtual_baseline_name: 356 if not non_virtual_baseline_name:
356 return result, self._files_to_delete, self._files_to_add 357 return result, self._files_to_delete, self._files_to_add
357 358
358 self._optimize_virtual_root(baseline_name, non_virtual_baseline_name) 359 self._optimize_virtual_root(baseline_name, non_virtual_baseline_name)
359 360
360 _log.debug("Optimizing non-virtual fallback path.") 361 _log.debug("Optimizing non-virtual fallback path.")
361 result |= self._optimize_subtree(non_virtual_baseline_name) 362 result |= self._optimize_subtree(non_virtual_baseline_name)
362 return result, self._files_to_delete, self._files_to_add 363 return result, self._files_to_delete, self._files_to_add
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/optimize_baselines_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698