mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Print branch name when running presubmits
This implements the proposed solution B in https://crbug.com/380877175#comment5 and will help distinguish presubmit results when working with stacked changes. Bug: 380877175 Change-Id: I7f0807f7ce03109288976069c57c28488d6cadfd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6196130 Reviewed-by: Yiwei Zhang <yiwzhang@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
This commit is contained in:
@@ -1922,10 +1922,14 @@ def DoPresubmitChecks(change,
|
||||
1 if presubmit checks failed or 0 otherwise.
|
||||
"""
|
||||
with setup_environ({'PYTHONDONTWRITEBYTECODE': '1'}):
|
||||
if committing:
|
||||
sys.stdout.write('Running presubmit commit checks ...\n')
|
||||
else:
|
||||
sys.stdout.write('Running presubmit upload checks ...\n')
|
||||
running_msg = 'Running presubmit '
|
||||
running_msg += 'commit ' if committing else 'upload '
|
||||
running_msg += 'checks '
|
||||
if branch := scm.GIT.GetBranch(change.RepositoryRoot()):
|
||||
running_msg += f'on branch {branch} '
|
||||
running_msg += '...\n'
|
||||
sys.stdout.write(running_msg)
|
||||
|
||||
start_time = time_time()
|
||||
presubmit_files = ListRelevantPresubmitFiles(
|
||||
change.AbsoluteLocalPaths() + change.AbsoluteLocalSubmodules(),
|
||||
|
||||
Reference in New Issue
Block a user