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

Side by Side Diff: PRESUBMIT.py

Issue 1955993004: Fix PRESUBMIT.py erros on uploading DEPS change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: nit Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Top-level presubmit script for Chromium. 5 """Top-level presubmit script for Chromium.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into depot_tools. 8 for more details about the presubmit API built into depot_tools.
9 """ 9 """
10 10
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 'This is a dry run, skipping OWNERS check for DEPS additions')] 1059 'This is a dry run, skipping OWNERS check for DEPS additions')]
1060 if not input_api.change.issue: 1060 if not input_api.change.issue:
1061 return [output_api.PresubmitError( 1061 return [output_api.PresubmitError(
1062 "DEPS approval by OWNERS check failed: this change has " 1062 "DEPS approval by OWNERS check failed: this change has "
1063 "no Rietveld issue number, so we can't check it for approvals.")] 1063 "no Rietveld issue number, so we can't check it for approvals.")]
1064 output = output_api.PresubmitError 1064 output = output_api.PresubmitError
1065 else: 1065 else:
1066 output = output_api.PresubmitNotifyResult 1066 output = output_api.PresubmitNotifyResult
1067 1067
1068 owners_db = input_api.owners_db 1068 owners_db = input_api.owners_db
1069 owner_email, reviewers = input_api.canned_checks._RietveldOwnerAndReviewers( 1069 owner_email, reviewers = (
1070 input_api, 1070 input_api.canned_checks.GetCodereviewOwnerAndReviewers(
1071 owners_db.email_regexp, 1071 input_api,
1072 approval_needed=input_api.is_committing) 1072 owners_db.email_regexp,
1073 approval_needed=input_api.is_committing))
1073 1074
1074 owner_email = owner_email or input_api.change.author_email 1075 owner_email = owner_email or input_api.change.author_email
1075 1076
1076 reviewers_plus_owner = set(reviewers) 1077 reviewers_plus_owner = set(reviewers)
1077 if owner_email: 1078 if owner_email:
1078 reviewers_plus_owner.add(owner_email) 1079 reviewers_plus_owner.add(owner_email)
1079 missing_files = owners_db.files_not_covered_by(virtual_depended_on_files, 1080 missing_files = owners_db.files_not_covered_by(virtual_depended_on_files,
1080 reviewers_plus_owner) 1081 reviewers_plus_owner)
1081 1082
1082 # We strip the /DEPS part that was added by 1083 # We strip the /DEPS part that was added by
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 results.extend(input_api.canned_checks.CheckTreeIsOpen( 2123 results.extend(input_api.canned_checks.CheckTreeIsOpen(
2123 input_api, 2124 input_api,
2124 output_api, 2125 output_api,
2125 json_url='http://chromium-status.appspot.com/current?format=json')) 2126 json_url='http://chromium-status.appspot.com/current?format=json'))
2126 2127
2127 results.extend(input_api.canned_checks.CheckChangeHasBugField( 2128 results.extend(input_api.canned_checks.CheckChangeHasBugField(
2128 input_api, output_api)) 2129 input_api, output_api))
2129 results.extend(input_api.canned_checks.CheckChangeHasDescription( 2130 results.extend(input_api.canned_checks.CheckChangeHasDescription(
2130 input_api, output_api)) 2131 input_api, output_api))
2131 return results 2132 return results
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698