DescriptionFix per-file owners check for deleted files.
Previously if you deleted a file that you had per-file owners on, it would fail
the owners check. This fixes that.
Originally, owners.Database used glob to enumerate the directory and added all
the matching files in the directory to some dicts holding the owners
information. If a CL deleted a file, it'd no longer be on the filesystem, so it
wouldn't be in these dicts. There'd be no per-file owners information for it.
With this patch, the Database no longer enumerates individual files. It instead
keeps track of the glob patterns and checks the CL's files against the patterns
at lookup time.
BUG=622381
TEST=tests/owners_unittest.py && tests/owners_finder_test.py # Unit test included.
Committed: https://chromium.googlesource.com/chromium/tools/depot_tools/+/944b60530e30ff97179b273360c8d3fb4f8cea7a
Patch Set 1 #
Total comments: 3
Patch Set 2 : Rebase! #
Messages
Total messages: 17 (8 generated)
|