Commit 9b4a0570 authored by Bruce Dawson's avatar Bruce Dawson Committed by LUCI CQ

Print clarifying message when no new owners needed

If a CL already has owners on the reviewer list that cover all of the
files - regardless of whether they have approved the change - git cl
owners just prints ** You selected these owners **, which can be
confusing. This change adds an explanation in the no-unowned-files case
and suggests using --ignore-current if more reviewers are wanted.

Bug: 1071967
Change-Id: If60455c5ec15006e09feed39633fa62e3ddf0a04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2183222Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
parent 97ed44ad
......@@ -334,14 +334,19 @@ class OwnersFinder(object):
# Print results
self.writeln()
self.writeln()
self.writeln('** You selected these owners **')
self.writeln()
for owner in self.selected_owners:
self.writeln(self.bold_name(owner) + ':')
self.indent()
for file_name in sorted(self.owners_to_files[owner]):
self.writeln(file_name)
self.unindent()
if len(self.selected_owners) == 0:
self.writeln('This change list already has owner-reviewers for all '
'files.')
self.writeln('Use --ignore-current if you want to ignore them.')
else:
self.writeln('** You selected these owners **')
self.writeln()
for owner in self.selected_owners:
self.writeln(self.bold_name(owner) + ':')
self.indent()
for file_name in sorted(self.owners_to_files[owner]):
self.writeln(file_name)
self.unindent()
def bold(self, text):
return self.COLOR_BOLD + text + self.COLOR_RESET
......
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