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

Unified Diff: presubmit_support.py

Issue 6581030: Add first changes needed for OWNERS file support. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools
Patch Set: more linting Created 9 years, 10 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
Index: presubmit_support.py
diff --git a/presubmit_support.py b/presubmit_support.py
index 38d29902752bc176f7175cd3fbc27cd190f3156f..a4ae07824d68a97ea3e2235f37f65c7367b8d32d 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -51,6 +51,7 @@ except ImportError:
# Local imports.
import gclient_utils
+import owners
import presubmit_canned_checks
import scm
@@ -255,6 +256,11 @@ class InputApi(object):
# We carry the canned checks so presubmit scripts can easily use them.
self.canned_checks = presubmit_canned_checks
+ # TODO(dpranke): figure out a list of all approved owners for a repo
+ # in order to be able to handle wildcard OWNERS files?
+ self.owners_db = owners.Database(change.RepositoryRoot(),
+ fopen=file, os_path=self.os_path)
+
def PresubmitLocalPath(self):
"""Returns the local path of the presubmit script currently being run.
@@ -634,6 +640,10 @@ class Change(object):
self._local_root = os.path.abspath(local_root)
self.issue = issue
self.patchset = patchset
+
+ # TODO(dpranke): implement - get from the patchset?
+ self.approvers = set()
+
self.scm = ''
# From the description text, build up a dictionary of key/value pairs
« owners.py ('K') | « presubmit_canned_checks.py ('k') | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698