Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |