When CheckPatchFormatted presubmited canned check is executed, it runs
git cl format with --dry-run. When dry-run is used, exit codes are
ignored and we rely on only on stdout message to detect if formatting is
needed or not. This itself is wrong, but changing this will likely
require significant redesign.
This patch appends stderr output to stdout message on non-zero exit code
and therefore allowing git cl format to actually exit with code 2.
R=gavinmak@google.com
Fixed: 1264111
Change-Id: I5eccf34f533640fd93209c97d1c8d9c85bb94d83
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3249191
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
I can't see any users of this version via cs/, so drop it to speed up
the ensure_bootstrap phase.
Change-Id: Ib6e26490c9194959d55ed9199aade7b72ff3ebd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3246423
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
I can't see any users of this version via cs/, so drop it to speed up
the ensure_bootstrap phase.
Change-Id: I6598dacbde336ae555bdc101d4044c078907570d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3246422
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
I can't see any users of this version via cs/, so drop it to speed up
the ensure_bootstrap phase.
Change-Id: Ib1e3ca75f1d091161c57a33f238c64973949a584
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3246413
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Running each bootstrap in serial seriously slows things down, and it
gets worse as we add more. On my very expensive desktop, the no-op
case takes 5 seconds. When running in parallel, it's now ~1.5 sec.
Change-Id: I4304fddf22ef5a718218a807aeb05e08e5418bb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3245746
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
I can't see any users of this version via cs/, so drop it to speed up
the ensure_bootstrap phase.
Change-Id: I3779228daec2858d48c288023ffdb924b5038297
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3245745
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
When using alias, we no longer can't nor need to prefix command with
git. This change updates all [alias] blocks and removes git from it.
Change-Id: Id89142ef86935e04e21872ce61fb63a511ed40a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3244473
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
This value is passed in the JSON body, not in the URL, so does not need
to be escaped, otherwise trying to make a branch/tag from another
branch/tag leads to errors like:
gerrit_util.GerritError: (400) Bad Request: invalid revision "refs%2Fheads%2Fchromium%2F4665"
BUG=1052179
R=linxinan@chromium.org, sokcevic@google.com
Change-Id: I80d709370165fcb84a3375e18b67d4a921be9a8d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3243724
Auto-Submit: Michael Moss <mmoss@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Xinan Lin <linxinan@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
These lints are redundant and in rare cases may conflict with
clang-format output. We treat clang-format's output as the correct
formatting, so disable the lints.
The following whitespace lints are retained, all others are disabled:
whitespace/blank_line
whitespace/comments
whitespace/empty_conditional_body
whitespace/empty_if_body
whitespace/empty_loop_body
whitespace/ending_newline
whitespace/todo
Bug: chromium:1240500
Change-Id: I22e2d8ea4de021ea389e155d8c9e096c3ae6f8b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3231485
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Collin Baker <collinbaker@chromium.org>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.
The build that created this CL was
https://ci.chromium.org/b/8832347904217217633
recipe_engine:
151ff69edf~..9041c56a7c586eefee7cccb761fe305ed1681d87
151ff69 (jwata@google.com)
[swarming] update luci-go swarming version
9041c56 (mohrr@google.com)
Handle string exit_code in swarming task result
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
R=iannucci@chromium.org
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Iaeafd072892426abcd44b77e7e7c4667a6d6b72f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3244108
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
This version will start generating `lucicfg {...}` section in
project.cfg, but only when some other config file changes (so
that lucicfg version change itself doesn't require all configs
to be regenerated).
This information will be used by LUCI tooling to figure out how
to regenerate LUCI project configs en masse.
Use `lucicfg generate -force main.star` to forcefully generate
`lucicfg {...}` section in the existing configs.
R=iannucci@chromium.org
Change-Id: I001ceb0dae1df797c2f76c3f6a28b8420d18f4d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3232093
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Gitwatch supports closing bugs with a FIX(ES|ED|ING)? tag in the
commit message, but we only check BUG to ensure a bug is
specified, add the fix fields to BugsFromDescription so that presubmits
will still pass if only eg: FIXES=b:1234 is given.
Gitwatch reference:
http://shortn/_LGPgBjgi3A
FIXED=b:203812728
TEST=presubmit_unittest.py doesn't fail more than it already does
Change-Id: I6afc38c786e281dcefb4d359bb9212ebe5980ed6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3237598
Auto-Submit: Sean McAllister <smcallis@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
This will make it easier to call new or uncommon Gerrit APIs, without
needing to add dedicated methods for each one. This also makes it easier
to debug API calls by exposing the raw response data, which is often
processed or filtered in the existing wrapper methods.
BUG=1052179
R=linxinan@chromium.org
Change-Id: I0b594a9fdaabae4b0ebb379dc5473f4d6de67a13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3235714
Auto-Submit: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Xinan Lin <linxinan@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
If one uses update_files() method to file a chain of CLs and wants
to submit them together, they have to set submit=False to wait for the
last CL. As a result, users have to run `set Bot-Commit+1` for each CL
at their side, which is annoying.
This change makes the gerrit module to handle that, and callers only
need to submit the chain.
BUG=1261724
TEST=train
Change-Id: If7d420d8d3c40b1d462284395cdc87ac680d0918
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3235388
Commit-Queue: Xinan Lin <linxinan@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Michael Moss <mmoss@chromium.org>
Only hanging process recorded so far is gsutil. Sending sigterm doesn't
result in successfully terminating the process. Instead, use sigkill.
R=gavinmak@google.com
Bug: 1255228
Change-Id: Iad354284422676df804c68cb6f18c7db723bf862
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3232250
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Was finding only "master" commits.
Change-Id: I434a0cb8d2112d6173e638814ad10f401c2fb9b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3226313
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
The command is used for verification purposes when git index is fetched
from GS. The output is verbose for chromium/src and not useful at all.
R=gavinmak@google.com
Bug: 1255228
Change-Id: Ie95963a23ef397e9fd6ce7bcf959ec9964d21ba7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3227145
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Notable changes:
1. Do not produce semantically unimportant diffs by default.
2. Support configuring bug_url_template in milo.cfg
R=iannucci, vadimsh
Change-Id: I2c7df4d16129dc55148e6c4ccfbf73aa50242be7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3224847
Auto-Submit: Weiwei Lin <weiweilin@google.com>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
This is a reland of d3cfea0c78
Original change's description:
> Limit number of concurrent gsutil cp calls
>
> gsutil utilizes as many cores as possible, and will create many threads
> too. In combination with gclient doing the same thing (utilize as many
> cores as possible), this results in creating way too many processes and
> some builders are running out of resources (e.g. can't create threads).
>
> This limits number of gsutil cp commands in git_cache to two.
>
> R=apolito@google.com, dpranke@google.com
>
> Bug: 1255228, 1249003
> Change-Id: Ifcccaacde6c9e1c60c1da0a0bc5a3e512e158dcc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3219900
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Bug: 1255228, 1249003
Change-Id: I712bf5f625fd42992e7b5310ae005fad2633e1a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3223155
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
These package versions have conflicting dependencies.
The conflict is caused by:
The user requested astroid==2.4.2
pylint 2.7.4 depends on astroid<2.7 and >=2.5.2
Change-Id: Id2724413f18d1cb62a6cc9cb936edf26f245f621
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3224599
Auto-Submit: Chenlin Fan <fancl@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
This change removes the need for the Gerrit plugin recipe to clone the
Gerrit repo itself.
Recipe-Nontrivial-Roll: infra
Bug: 1196790
Change-Id: I3d6bb71a2e95c50c4dc29345ad24e482177233d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3224087
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>