I set DEPOT_TOOLS_UPDATE to 0 because I sometimes contribute to
depot_tools (and because I was negatively impacted a few times in the
past by a depot tools update in ways that I can't recall.)
Anyway, if you set the DEPOT_TOOLS_UPDATE variable to 0, then even
explicitly doing `update_depot_tools` from the command line will not
actually do an update, you need to set the environment variable to a
different value before attempting an update.
This script is so old that its behavior probably shouldn't be changed.
But we can tell the user what update_depot_tools is doing and why, and
how to get it to do a real update.
Change-Id: I67458e78b5e64f8ea75ffad73b2ede0955c4d91f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5824829
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gregory Nisbet <gregorynisbet@google.com>
If a commit's Change-Id identifies more than one change, git cl
cherry-pick will get an error when trying to rebase the cherrypick:
"Multiple changes found for <change-id>"
Make sure the command only uses a CL's unique ID.
Bug: b/362514041
Change-Id: Ia84053fc8a49eadfc0f1e732929fb58e507a6bb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5818412
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
If user forgets to set `use_reclient=false`,
```
ukai@ukai /google/cog/cloud/ukai/siso-test/chromium
% ~/depot_tools/autoninja -C out/Default base
WARNING: You're not using Siso's built-in remote execution. The build will be slow.
You should set the following in args.gn to get better performance:
use_remoteexec=true
use_reclient=false
use_siso=true
Proxy started successfully.
```
Bug: b/362301140
Change-Id: I40972b96fd2576c32232f88e6248a1000708c3e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5816108
Reviewed-by: Junji Watanabe <jwata@google.com>
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Gary Tong <gatong@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Philipp Wollermann <philwo@google.com>
Many tools use vpython so we can avoid pyc writes by
disabling them at this layer.
Bug: b/320565954
Change-Id: I50cd04968810ecc186d5abe6c67e54ae1647c739
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5812665
Commit-Queue: Erik Staab <estaab@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
If build/config/siso/.sisoenv exists, but third_party/siso/cipd/siso
doesn't exist, it prints error
depot_tools/siso.py: Could not find .sisoenv under build/config/siso of the current project. Did you run gclient sync?
But it should print error as siso binary not in third_party/siso
instead.
Change-Id: I6a6a920b0e6d877551f0fa7c650ab7c8165180bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5802659
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
checkOutdir should be called before run `siso ninja`
to not run `siso ninja` where `ninja` is used.
Change-Id: I55453b21d35396b59924be5398b47f67b592eca1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5802658
Reviewed-by: Philipp Wollermann <philwo@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
When $SISO_PATH is set, allow to run it even if .sisoenv not found.
Useful for `siso fetch`, `siso recall` etc, which would not be
needed to run in chromium checkout dir.
Change-Id: If3bfcf879cc67dc41bedf17cd771c94de836c949
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5804427
Commit-Queue: Richard Wang <richardwa@google.com>
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Philipp Wollermann <philwo@google.com>
Reviewed-by: Richard Wang <richardwa@google.com>
See go/chrome-infra-telemetry-dd for more details. This CL is to
establish a folder where we can create infra libraries shared by
depot_tools and chromium/src. Note that the folder cannot be named
lib due to https://crbug.com/40259280. "libs" should avoid that
problem
Bug: 326277821
Change-Id: I71641ee74d15474353ef0210579a3a24d2726270
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5797754
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
CheckForCommitObjects is not working correctly if there is a
PanProjectChecks in non-root PRESUBMIT.py together with a DEPS file in
the same directory. Instead, PRESUBMIT needs to check the root DEPS
file.
In order to get commit objects (gitlink), we need to run Git ops. This
patch relies on Git to provide the root DEPS file.
R=gavinmak@google.com
Fixed: 359944302
Change-Id: I7934a24c1ea8e6b6daa2f936ad4209ad9cdad5ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5784174
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
The main process exits right after ninja_uploader.py subprocess starts,
which may print ResourceWarning from subprocess.
e319f774f9/Lib/subprocess.py (L946-L947)
This CL ignores the warning message.
Change-Id: I800387194763e60a16437b3bd41fa282b605dda7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5782795
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Otherwise, when this is run concurrently by gclient, it causes race conflicts.
Bug: b/356935829
Change-Id: Ic7697415f7dbb82971be511c5058206f9195e896
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5784434
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
Slow presubmits like CheckUnwantedDependencies can often take over 30s
to run. Print a "still running" message so users don't think something
hung.
Bug: b/358457858
Change-Id: I47f5589af43d8fb0f384e6f7c633e9d0addd568a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5782588
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
In particular, the supported headers and <type_traits> members have
changed.
I removed the "legacy C++" headers since these are arcane and long
unsupported.
Also fixed what looked like some missing operators in a couple regexes.
Bug: none
Change-Id: I84a983efeb95ec806eaf6d75866d7079ca1bdd96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5777599
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
On failure, gerrit_util always retries HTTP requests the maximum
number of times. This doesn't always make sense, e.g. for RebaseChange
which gets 409 on a merge conflict and can't be retried into
succeeding.
Bug: b/341792235
Change-Id: I6f9e212c5b0365236a99768f056bab2eb60cddc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5773566
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
I ran into this from having use_siso=true in an include(), and then
trying to turn it off again via an assignment
Change-Id: Iba70ade68c7a3699755d6a0070816283e0538c6f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5769918
Commit-Queue: Junji Watanabe <jwata@google.com>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>
None of the optional params are used currently, so make them keyword
to ease future changes, like adding the global_config in the next CL.
Change-Id: I213cccb945c969b4211adad8ccd9170ef6209e0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5773568
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
This CL updates the CIPD client in depot_tools to the latest version.
The new cipd client has `-json-output` option for auth-info subcommand. https://crrev.com/c/5467900
Change-Id: Iae0396a159a67c1a59af8dfe5e74b755ccfd1475
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5772153
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
This will allow `git cl` to be much more consistent with regards to
setting and reading git config key values in both production and
testing.
R=ayatane, yiwzhang
Change-Id: I2f1f1c5c6aaab12e2e9dbcf36c181244706cd4a8
Bug: 357688295
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5762199
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
This script will be used to roll downstream GCS packages.
Bug: 358435510
Change-Id: I7ea1229eb4e8c4c590cad336573f9d24662f5730
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5765858
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Users who want to upload multiple cherry picks usually run "git
cherry-pick" locally, multiple times. Gerrit does not recognize
these changes as cherry picks and neither do other services that
query cherry pick info from Gerrit, e.g. rubber stamper.
For Gerrit to identify a change as a true cherry pick, you need to
use their Cherry Pick Revision REST API endpoint. This new command
uses it to create a chain of cherry pick CLs recognized by Gerrit.
Bug: b/341792235
Change-Id: I4ba75da3901f6ea68c1debd65820e802da681798
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5756161
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
If Chromium is the canonical repository, the version of the dependency
is essentially Chromium.
Change-Id: Ifcb80dbeee0d36bf71234f8f48423e8f7aa9dcf0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5772151
Reviewed-by: Rachael Newitt <renewitt@google.com>
Commit-Queue: Jiewei Qian <qjw@chromium.org>
presubmit_diff always tries to decode files from Gitiles with UTF-8
but if the file is binary, it gets a UnicodeDecodeError. Don't
assume that a file is text and just write the bytes directly.
Bug: b/358175830
Change-Id: Iaa259051b4157737397933e9d994c00e9da5836c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5771938
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>