Commit add5df4c authored by dpranke@chromium.org's avatar dpranke@chromium.org

fix typos in CheckOwners()

Review URL: http://codereview.chromium.org/6628072

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77361 0039d316-1c4b-4281-b951-d872f2087c98
parent 6dada4ee
......@@ -627,20 +627,20 @@ def CheckBuildbotPendingBuilds(input_api, output_api, url, max_pendings,
def CheckOwners(input_api, output_api, source_file_filter=None):
affected_files = set(input_api.change.AffectedFiles(source_file_filter))
affected_files = set([f.LocalPath() for f in
input_api.change.AffectedFiles(source_file_filter)])
owners_db = input_api.owners_db
if input_api.is_commiting:
if input_api.is_committing:
missing_files = owners_db.FilesNotCoveredBy(affected_files,
input_api.change.approvers)
if missing_files:
return [output_api.PresubmitPromptWarning('Missing approvals for: %s' %
','.join(missing_files))]
return []
else:
if not input_api.change.get('R', None):
suggested_reviewers = owners_db.OwnersFor(affected_files)
elif input_api.change.tags.get('R'):
return []
# TODO(dpranke): consider getting multiple covering sets of reviewers
# and displaying them somehow?
input_api.change['R'] = ','.join(suggested_reviewers)
suggested_reviewers = owners_db.ReviewersFor(affected_files)
# TODO(dpranke): Actually propagate the info back.
return []
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment