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/+/2183222
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
changes/22/2183222/2
Bruce Dawson 5 years ago committed by LUCI CQ
parent 97ed44ada9
commit 9b4a0570e5

@ -334,6 +334,11 @@ class OwnersFinder(object):
# Print results # Print results
self.writeln() self.writeln()
self.writeln() self.writeln()
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('** You selected these owners **')
self.writeln() self.writeln()
for owner in self.selected_owners: for owner in self.selected_owners:

Loading…
Cancel
Save