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

Unified Diff: presubmit_canned_checks.py

Issue 12377023: Use author as determined from scm if we can not get it from rietveld (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: update w/ review feedback Created 7 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
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index f8513b78b8c9a68959306d97a01956dab0a7838c..0f100d9bfc37e6d472e0cb2214f7c9beb304ef24 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -793,25 +793,19 @@ def CheckOwners(input_api, output_api, source_file_filter=None,
owners_db.email_regexp,
approval_needed=input_api.is_committing)
- if author_counts_as_owner:
- if owner_email:
- message = ''
- reviewers_plus_owner = reviewers.union(set([owner_email]))
- else:
- message = ('\nUntil the issue is uploaded, this list will include '
- 'files for which you are an OWNER.')
- owner_email = ''
- reviewers_plus_owner = set()
+ owner_email = owner_email or input_api.change.author_email
+
+ if author_counts_as_owner and owner_email:
+ reviewers_plus_owner = set([owner_email]).union(reviewers or set())
missing_files = owners_db.files_not_covered_by(affected_files,
- reviewers_plus_owner)
+ reviewers_plus_owner)
else:
- message = ''
missing_files = owners_db.files_not_covered_by(affected_files, reviewers)
if missing_files:
output_list = [
- output('Missing %s for these files:\n %s%s' %
- (needed, '\n '.join(missing_files), message))]
+ output('Missing %s for these files:\n %s' %
+ (needed, '\n '.join(missing_files)))]
if not input_api.is_committing:
suggested_owners = owners_db.reviewers_for(affected_files, owner_email)
output_list.append(output('Suggested OWNERS:\n %s' %
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698