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

Unified Diff: owners.py

Issue 11867016: handle OWNERS suggestions where anyone can approve better. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 11 months 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 | tests/owners_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: owners.py
diff --git a/owners.py b/owners.py
index d56c36f386772aeaee4d038a0165a8d964165c17..8007e171c29c059589be1b0ea77f7a9b74694413 100644
--- a/owners.py
+++ b/owners.py
@@ -121,7 +121,13 @@ class Database(object):
files is a sequence of paths relative to (and under) self.root."""
self._check_paths(files)
self._load_data_needed_for(files)
- return self._covering_set_of_owners_for(files)
+ suggested_owners = self._covering_set_of_owners_for(files)
+ if EVERYONE in suggested_owners:
+ if len(suggested_owners) > 1:
+ suggested_owners.remove(EVERYONE)
+ else:
+ suggested_owners = set(['<anyone>'])
+ return suggested_owners
# TODO(dpranke): rename to objects_not_covered_by
def directories_not_covered_by(self, files, reviewers):
« no previous file with comments | « no previous file | tests/owners_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698