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

Unified Diff: presubmit_canned_checks.py

Issue 6674014: Make git-cl work with OWNERS files in a non .git/hooks/pre-cl-* world (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: rebase to HEAD, minor linting, cleanup, testing, fix post-commit hook Created 9 years, 9 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_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index b3d36199ff04e7868fa25bf7b6d5abc203c448b6..40df31a59d60bb2bd9f5006f3cf9641652456f0d 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -626,10 +626,13 @@ def CheckBuildbotPendingBuilds(input_api, output_api, url, max_pendings,
return []
-def CheckOwners(input_api, output_api, source_file_filter=None):
+def CheckOwners(input_api, output_api, email_regexp=None,
+ source_file_filter=None):
affected_files = set([f.LocalPath() for f in
input_api.change.AffectedFiles(source_file_filter)])
owners_db = input_api.owners_db
+ if email_regexp:
+ owners_db.email_regexp = input_api.re.compile(email_regexp)
if input_api.is_committing and input_api.tbr:
return [output_api.PresubmitNotifyResult(

Powered by Google App Engine
This is Rietveld 408576698