mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Make tree-closed a warning for presubmit --all
presubmit --all should succeed regardless of the current state of the tree. Otherwise a presubmit --all bot will be flaky due to circumstances beyond its control. This is a logical follow-on to crrev.com/c/3628368 which turned some other errors into warnings for presubmit --all. Bug: 1309977 Change-Id: I6d26708f8c47916cf015dec75e27833db7ca465b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3696070 Auto-Submit: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
This commit is contained in:
@@ -712,6 +712,10 @@ def CheckTreeIsOpen(input_api, output_api,
|
||||
if not status['can_commit_freely']:
|
||||
short_text = 'Tree state is: ' + status['general_state']
|
||||
long_text = status['message'] + '\n' + json_url
|
||||
if input_api.no_diffs:
|
||||
return [
|
||||
output_api.PresubmitPromptWarning(short_text, long_text=long_text)
|
||||
]
|
||||
return [output_api.PresubmitError(short_text, long_text=long_text)]
|
||||
else:
|
||||
# TODO(bradnelson): drop this once all users are gone.
|
||||
|
||||
Reference in New Issue
Block a user