Detect the name of unknown operating systems using uname, if available,
since it doesn't append the operating system version.
Change-Id: Idab7bd0db65a8d424ec2fd48f06247405b6649e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4169240
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
This change updates roll-dep to update submodule revision using `git update-index` instead of `git add` to stay consistent with our design.
Fix: 1406766
Change-Id: Ic23b9758a5893ac211d459a3c451bb102d4501a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4177144
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
This change adds submodule support to roll-dep. Currently, roll-dep command takes a set of dependencies, revisions to roll them to (or origin/HEAD by default), uses `gclient getdep` to get the current rev, and `gclient setdep` to update the DEPS file.
With this change, if `.gitmodules` is present, roll-dep uses it instead to find the current revision and also updates the submodule's pinned revision. This also keeps the existing flow for updating DEPS file for interperability.
Fixed: 1406766
Change-Id: I56b6e268cc1a7c49dabc2dc39fef2d820d2690c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4167341
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
The validate_prefix file is now rolled out on prod so we
don't need that check any more.
Bug: 1116488
Change-Id: Ibbbfd29366e3e41d8e52d65dd7553f2e521ffd63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4167358
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Weilun Shi <sweilun@chromium.org>
Commit-Queue: Weilun Shi <sweilun@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
This is a reland of commit 5e5802d7a2
This was reverted as a temporary fix for servers running python 3.5. This reland removes `encoding` arg from `subprocess.run` temporarily until all servers are migrated to a supported python version.
Original change's description:
> Update log when luci-auth is not logged-in
>
> This change updates gsutil.py to capture when luci-auth is not logged in and prints useful log for signing in. This change couple enables luci-auth UI when luci-auth is enabled.
>
> Bug: 959170, 1359383
> Change-Id: Ic636bb362df388073e1fd11d736a47f35b749016
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4154550
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Bug: 959170, 1359383
Change-Id: I409a49362f0c584bd39f1031671e9e089cf50f97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4165881
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
This reverts commit 5e5802d7a2.
Reason for revert: This CL introduces a dependency on Python version 3.10. I'm not clear that this is allowed for depot_tools. We are using it on systems with Python 3.5.
Original change's description:
> Update log when luci-auth is not logged-in
>
> This change updates gsutil.py to capture when luci-auth is not logged in and prints useful log for signing in. This change couple enables luci-auth UI when luci-auth is enabled.
>
> Bug: 959170, 1359383
> Change-Id: Ic636bb362df388073e1fd11d736a47f35b749016
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4154550
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Bug: 959170, 1359383
Change-Id: I0a73051f6b65786374f2b585f13ca88f5f8f83d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4165720
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
This change updates gsutil.py to capture when luci-auth is not logged in and prints useful log for signing in. This change couple enables luci-auth UI when luci-auth is enabled.
Bug: 959170, 1359383
Change-Id: Ic636bb362df388073e1fd11d736a47f35b749016
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4154550
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
These are all things I would expect to not hit the network.
Bug: None
Change-Id: I44bddd94e8da13df57f3cd068def9a5e51774bc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4161184
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
This actually updates the CIPD client to a version that has
a windows-arm64 build, as well as modifies the bootstrap script
to support multiple possible Windows platforms (which is very
similar to what was done to support mac-arm64 on OSX).
By default windows-amd64 is still used everywhere, even on arm64 OS.
To opt-in into windows-arm64, create a file .cipd_client_platform
under depot_tools directory with a single line "windows-arm64".
The bootstrap script now recognizes this file (if it exists) and
rebootstraps the CIPD client if the platform changes. Since this
check needs to happen on every CIPD invocation, it is done in
the batch file, to avoid hitting relatively heavy Powershell on
the hot path.
Finally, do some minor style cleanup in the powershell script to
make it look more consistent.
CIPD client change log:
9cc9fd49..5252f4fc7/cipd
R=bryner@google.com
Change-Id: I4fe5c4ea5e0b5cbb43e7b8c4702dc9fb0627c056
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4153336
Reviewed-by: Brian Ryner <bryner@google.com>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
ninja.bat can't pass '^' for single file compile.
This change fixes ninja.bat to apply double quotas to args to preserve "^".
Note that ninja.bat still needs "^^" since single "^" is already removed as an escape character.
This is the same implementation with autoninja.{bat, py}.
Test: http://go/paste/6182226814304256
Bug: 1340825
Change-Id: I183c7890634a77471a617c4cc2b9c8c33bc8487d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4060603
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
The change updates gsutil.py to internally use luci-auth for
authentication. It redirects `gsutil.py config` to `luci-auth login` and
wraps gsutil.py calls using `luci-auth context`.
The change is mainly done to ensure users have a way to authenticate once OOB authentication flow is deprecated. This patch falls back to using the .boto file when that is provided.
Design Document: go/gsutil-oauth-issue-resolved
Bug: 959170, 1359383
Change-Id: Icc6df1d8b93424ac0f6e2df84afdebc869763ede
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4109192
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
While we're at it, ensure that the working directory is reverted even if
exceptions are raised by moving that part into a finally block.
Bug: 1404222
Change-Id: I8606bc5810202ff1ecdc7f202e3f574bf643f91d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4129515
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Pavol Marko <pmarko@chromium.org>
This gives users an idea of what changes they are applying.
Bug:1382528, 1405491
Change-Id: Icb1e94f193b9cba3d80cc918c2abb11c2527ad3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4082289
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
triggered_by in CQ configs has now not been used by any projects
for a month. This is a deprecated property that we don't
support anymore in CV.
location_regexp and location_regexp_exclude has been replaced by location_filters and is not used in any projects any more.
Related buildbucket config change at
https://chrome-internal-review.googlesource.com/c/infradata/config/+/5229868
Bug: 1395209
Change-Id: I4e53606c8bcd7a784970beb337984a808321c5a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4113683
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
.rs files were not part of DEFAULT_FILES_TO_CHECK which means that they
were not being checked for proper licenses, among other things.
Testing with this command reveals that six missing or bad licenses have
crept in:
git cl presubmit --force --files "*.rs"
Output was:
Found a bad license header in these files:
build\rust\tests\test_aliased_deps\main.rs
build\rust\tests\test_aliased_deps\real_name.rs
mojo\public\rust\tests\util\mojom_validation.rs
testing\rust_gtest_interop\gtest_attribute.rs
tools\crates\gnrt\sample_package\foo\src\lib.rs
tools\crates\gnrt\sample_package\src\main.rs
Change-Id: Ia7788d92d428a4060f4a0b854fdcee0450b0a3f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4128762
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Collin Baker <collinbaker@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
roll-dep would confidently print "Commit message:" but then on Windows
would only actually give the first line of the message to git. This is
because multi-line command-lines don't actually work on all shells. This
change passes the commit message using a temporary file so that the full
message is retained on all operating systems.
This change also teaches roll-dep to give suggestions when a specified
dependency is not quite correct. This is particularly helpful if a
leading or trailing directory name is used. For instance, this command
seems plausible:
roll-dep third_party/openh264
But in fact it is wrong and a new user has to realize that a src prefix
is needed (in general) and in this specific case a src suffix is needed
as well. Prior to this change the error message would be:
KeyError: 'Could not find any dependency called third_party/openh264.'
But after this message it will instead say:
KeyError: 'Could not find any dependency called third_party/openh264. Did you mean src/third_party/openh264/src'
Past me wishes I'd done this years ago.
Change-Id: I6e0d6c703906b1c1ec947788fa259bae7b7520cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4120534
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
This new option (-n,--no-browser) prints the issue URL instead of opening it in
the browser. This is helpful, for instance, if you're SSH'ed in from a
Chromebook.
Change-Id: I28793280901f054af4eed2dbf2ce1fd109b8d37b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4121245
Commit-Queue: Orr Bernstein <orrb@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
In preparation for updating chromite requirements to Python 3.8,
start warning when people run with older versions.
Bug: b:187794810
Change-Id: I7b5430384c0818bca05df5642d8583fd16204105
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4062907
Reviewed-by: Brian Ryner <bryner@google.com>
Commit-Queue: Brian Ryner <bryner@google.com>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
This change looks for clang-format (and its script) *also*
inside third_party/clang-format (on top of buildtools/$plat).
This is to bring consistency to the recent changes [1] to
gn and ninja wrappers, which now look only in third_party
and not in buildtools/.
This is to make it so that a project can use depot_tools
without requiring both buildtools/ and third_party/
directories.
[1] See https://crrev.com/c/3925341
Bug: b/261398524
Bug: 1340825
Change-Id: I895d244592eed259ab8efa050cc87372d891246c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4079069
Commit-Queue: Primiano Tucci <primiano@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>