Commit c13ea848 authored by Mandy Chen's avatar Mandy Chen Committed by LUCI CQ

Change to slash separator to fix a bug on Windows in owners.py

Some of the owners.py code does not change file path to use the slash
separator, causing owners check to crash on Windows. This CL fixes it.

Change-Id: I6e06a235dbb563ea45691f19b03d826b23184b2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2626090Reviewed-by: 's avatarDirk Pranke <dpranke@google.com>
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
parent 8149a961
......@@ -513,7 +513,12 @@ class Database(object):
return owners
def _covering_set_of_owners_for(self, files, author):
dirs_remaining = set(self.enclosing_dir_with_owners(f) for f in files)
dirs_remaining = set()
for f in files:
dir_path = self.enclosing_dir_with_owners(f)
# Always use slashes as separators.
dirs_remaining.add(dir_path.replace(os.sep, '/'))
all_possible_owners = self.all_possible_owners(dirs_remaining, author)
suggested_owners = set()
while dirs_remaining and all_possible_owners:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment