From my recent go/gclient-sync-no-ops analysis, I noticed that
HostArch() is repeated called within get_builtin_vars() fn. The
`platform.architecture()` call made in arm-based systems and some x64 is
expensive and adds to gclient sync's runtime when repeatedly called.
When caching HostArch(), I noticed 22.4% speed-up in incremental no-op
gclient sync when run on arm-based machine.
Change-Id: I962c4fb0879d2931268f5bec1678ef782c56e7f2
Bug: 5076224
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5076226
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
All __future__ imports (unicode_literals, print_function) are already
mandatory in py3. Also remove an outdated py2 comment in
presubmit_canned_checks.py
Bug: 1475402
Change-Id: I27cf6a8268f6dd1081f22af782c4c29a975376ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4867135
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Leave the recipes/ code at 2 space to match the rest of the recipes
project in other repos.
Reformatted using:
files=( $(
git ls-tree -r --name-only HEAD | \
grep -Ev -e '^(third_party|recipes)/' | \
grep '\.py$';
git grep -l '#!/usr/bin/env.*python' | grep -v '\.py$'
) )
parallel ./yapf -i -- "${files[@]}"
~/chromiumos/chromite/contrib/reflow_overlong_comments "${files[@]}"
The files that still had strings that were too long were manually
reformatted because they were easy and only a few issues.
autoninja.py
clang_format.py
download_from_google_storage.py
fix_encoding.py
gclient_utils.py
git_cache.py
git_common.py
git_map_branches.py
git_reparent_branch.py
gn.py
my_activity.py
owners_finder.py
presubmit_canned_checks.py
reclient_helper.py
reclientreport.py
roll_dep.py
rustfmt.py
siso.py
split_cl.py
subcommand.py
subprocess2.py
swift_format.py
upload_to_google_storage.py
These files still had lines (strings) that were too long, so the pylint
warnings were suppressed with a TODO.
auth.py
gclient.py
gclient_eval.py
gclient_paths.py
gclient_scm.py
gerrit_util.py
git_cl.py
presubmit_canned_checks.py
presubmit_support.py
scm.py
Change-Id: Ia6535c4f2c48d46b589ec1e791dde6c6b2ea858f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4836379
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
windows-386 packages have started to bit-rot, use the windows-x64
versions instead (this implicitly restricts us to Windows 11)
Change-Id: If5417e9463914d9cb7b2e738ff46ef0faea4d1ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4116709
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
platform.machine() is 'arm64' on arm macs, and the `.startswith('arm')`
branch converted that to 'arm' before this CL.
Bug: 1103236,1190880
Change-Id: Idd75a724f059ecd2dd873737e4998fe9bc937e04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2779414
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
This enables gclient sync and gclient runhooks to run, barring hook script failures.
git cl upload also now works.
The scripts still work with Python 2.
There are no intended behaviour changes.
Bug: 942522
Change-Id: I2ac587b5f803ba7f5bb5e412337ce049f4b1a741
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1524583
Commit-Queue: Raul Tambre <raul@tambre.ee>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Trying to get "host_cpu" in DEPS file may fail on AIX.
Getting the "machine ID number" using "uname -m" on an AIX box, in an LPAR
environment will not generate a unique machine identifier and instead might
return a string such as "00f9445f4c00". "platform.processor()" will be used
as a fall back on AIX.
Change-Id: I7fada10059e29066f5a13d6135b01eaeaccb769d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1504554
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
This CL adds target_cpu and target_cpu_only variables. The logic is:
* If target_cpu is defined in .gclient, use it. Otherwise, initialize it as an
empty list.
* If not target_cpu_only, add the host arch to the list too.
detect_host_arch.py is copied directly from the Chromium repo.
BUG=807986
R=dpranke
Change-Id: I27621cbc81ad6a844648525863b92ffdd3b1d03a
Reviewed-on: https://chromium-review.googlesource.com/902441
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>