mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Fix get_files_affected_by_patch to work with spaces in file names.
Bug: 1288604 Change-Id: Ie116316062e50138668299538a5e0759a1dd3fa9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3459466 Auto-Submit: Garrett Beaty <gbeaty@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
This commit is contained in:
@@ -253,7 +253,7 @@ class TryserverApi(recipe_api.RecipeApi):
|
||||
self.m.raw_io.test_api.stream_output('foo.cc'),
|
||||
**kwargs)
|
||||
paths = [self.m.path.join(patch_root, p.decode('utf-8')) for p in
|
||||
step_result.stdout.split()]
|
||||
step_result.stdout.splitlines()]
|
||||
paths.sort()
|
||||
if self.m.platform.is_win:
|
||||
# Looks like "analyze" wants POSIX slashes even on Windows (since git
|
||||
|
||||
@@ -90,3 +90,14 @@ def GenTests(api):
|
||||
api.post_check(post_process.StatusSuccess),
|
||||
api.post_process(post_process.DropExpectation),
|
||||
)
|
||||
|
||||
yield api.test(
|
||||
'file-with-spaces',
|
||||
api.tryserver.get_files_affected_by_patch(['file with spaces.txt']),
|
||||
api.properties(
|
||||
patch_root='',
|
||||
expected_files=['file with spaces.txt'],
|
||||
),
|
||||
api.post_check(post_process.StatusSuccess),
|
||||
api.post_process(post_process.DropExpectation),
|
||||
)
|
||||
Reference in New Issue
Block a user