Setting this to `dirty` is generally desirable. If the user has
explicitly set it to something else on their chromium checkout,
warn rather than silently overwriting.
Rev^2: https://crrev.com/c/5832742
Change-Id: I8392c7976af0a1f8754a630bd865830ba6698051
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5836831
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Helmut Januschka <helmut@januschka.com>
Check /refs/heads/ strictly as branch revision type. Any ref (e.g. /refs/changes/*) not a branch has no difference from a hash.
Bug:341208163
Change-Id: I23e8c577b099adb88917527f827da3b122997cb2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5835142
Commit-Queue: Chenlin Fan <fancl@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
This reverts commit acd68a9a5d.
Reason for revert: Doesn't get values for non scoped config.
Original change's description:
> Avoid silently overwriting diff.ignoreSubmodules config.
>
> Setting this to `dirty` is generally desirable. If the user has
> explicitly set it to something else on their chromium checkout,
> warn rather than silently overwriting.
>
> Bug: 362787698
> Change-Id: I56587d501aafc5de78c82bc46e29f926519d25fa
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5832742
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Helmut Januschka <helmut@januschka.com>
Bug: 362787698
Change-Id: I3e5d1e44e3707dda53dc398f83c43259868d343b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5842067
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Joey Scarr <jsca@google.com>
Owners-Override: Joey Scarr <jsca@google.com>
Commit-Queue: Dan Le Febvre <dlf@google.com>
Setting this to `dirty` is generally desirable. If the user has
explicitly set it to something else on their chromium checkout,
warn rather than silently overwriting.
Bug: 362787698
Change-Id: I56587d501aafc5de78c82bc46e29f926519d25fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5832742
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Helmut Januschka <helmut@januschka.com>
When it's offline or the internet connection is unstable,
build_telemetry.enabled() may fail, which end up with
blocking autoninja command.
Bug: 364611323
Change-Id: Ie0d26e7b950e29af1392e452a0cd7e986494cdcf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5842066
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Philipp Wollermann <philwo@google.com>
If `git cl cherry-pick` fails to cherry-pick a CL, it should print
out the commit it failed to cherry-pick. Right now, that commit
is missing from the "print_any_remaining_commits" output
since commits get popped from the dict regardless of whether or
not a CL is created.
Bug: 364375259
Change-Id: Iac61f50b8f8f226b9e70bc2d0fa235f39c27d91e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5829953
Auto-Submit: Gavin Mak <gavinmak@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Multiple people have complained that we should format files when changing class names. That seems better than not formatting moved/copied files (you can always format a file separately before moving it to workaround the issue of moving unformatted files and presubmit complaining).
This CL essentially reverts https://crrev.com/c/4904205, meaning we will again run clang-format on files that were copied/moved.
https://crrev.com/c/5199134 is probably the proper fix by only looking at lines that were actually changed, but does not yet work with non-C++ formatters.
Checked locally that previously we wouldn't format a moved file, and with this change we now do.
Bug: 737568
Change-Id: Ie12c802316d5e293f2946c532e1600c342caaf59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5840596
Commit-Queue: Arthur Eubanks <aeubanks@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
This basically brings the functionality of git hyper-blame to git blame
by default and is supported since git 2.23.
Bug: none
Change-Id: I2023669deac999ef31d0e094e79d7214168acb63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5838110
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
If a CL and its cherry pick share a change ID, Gerrit will link to each
other in the UI.
Bug: 364692466
Change-Id: I6740ddfd813124d5876b29b05c4b8f91822faa57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5838865
Auto-Submit: Gavin Mak <gavinmak@google.com>
Reviewed-by: Matt Jones <mdjones@google.com>
Commit-Queue: Matt Jones <mdjones@google.com>
This only lasts per process invocation, so we don't worry about cache
size (and it's a minor performance save).
Bug: b/350806563
Change-Id: Ie8e1aa2933c5582a3a2e2f75f04590f6bb432c4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5833280
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
In case you're getting funny thoughts, these requests would not attach
any cookies anyway because the domain doesn't match. It just allows
requests to properly fallback to OAuth path.
Bug: b/362741558
Change-Id: Iaf83ad640501ff45671dbc358e676cbeaf04d686
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5824222
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
"Better" means:
1. Retrying a failed gerrit_util.CherryPick only once instead
of 5 times for faster feedback since more retries don't help.
2. Gracefully handling GerritErrors raised by gerrit_util.CherryPick
This CL also fixes a minor bug where the "Remaining commit(s) to
cherry pick" message would always print even if there were no more
commits left.
Bug: 341792235
Change-Id: I1712a6b080b14396463f3bceeeac84772f1253b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5825626
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
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>