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

Unified Diff: owners.py

Issue 11569018: Suggest owners for OWNERS files that only have per-file owners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | testing_support/filesystem_mock.py » ('j') | testing_support/filesystem_mock.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: owners.py
diff --git a/owners.py b/owners.py
index 109273e5c8ac355b03833af61e3a1cfbaa16ad79..1b1775f08c48ecbbb720c7d622c30d5932e7f84e 100644
--- a/owners.py
+++ b/owners.py
@@ -157,7 +157,8 @@ class Database(object):
def _is_under(f, pfx):
return self.os_path.abspath(self.os_path.join(pfx, f)).startswith(pfx)
_assert_is_collection(files)
- assert all(_is_under(f, self.os_path.abspath(self.root)) for f in files)
+ assert all(not self.os_path.isabs(f) and
+ _is_under(f, self.os_path.abspath(self.root)) for f in files)
def _check_reviewers(self, reviewers):
_assert_is_collection(reviewers)
@@ -256,7 +257,8 @@ class Database(object):
# Get the set of directories from the files.
dirs = set()
for f in files:
- dirs.add(self.os_path.dirname(f))
+ dirs.add(self._enclosing_dir_with_owners(f))
+
owned_dirs = {}
dir_owners = {}
« no previous file with comments | « no previous file | testing_support/filesystem_mock.py » ('j') | testing_support/filesystem_mock.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698