Also adds an echo to win_tools.bat so a user will know when the
bootstrapping script is skipped after a CIPD install error.
This should hopefully help when troubleshooting.
Bug: b/360206460
Change-Id: Ic8bfcbddfe4681a7716ca9f3793d045e0de704cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6242904
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Anne Redulla <aredulla@google.com>
Git is no longer installed by depot_tools (it should have been
installed directly). Thus, it can be removed from the bootstrap
manifest.
This CL applies the change to `manifest_bleeding_edge.txt`
first, to canary the change.
Bug: b/360206460
Change-Id: I78ced461bc68c33c9979668df1e275ccba6cd2e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6205606
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Anne Redulla <aredulla@google.com>
Logs a warning if reading the config fails. Still logs a warning for
recommended settings, so the user can create their global config.
Annoyingly, the exit code is the same for missing config file as it is
for an existing but invalid file.
Bug: b/382395049
Change-Id: I81113ff248f7a5eed2f9fd0303e0e81ae80d7d3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6086756
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Anne Redulla <aredulla@google.com>
In git 2.41, both `list` and `unset` are only options, `--list` and `--unset` respectively. See https://git-scm.com/docs/git-config/2.41.0
These modes are deprecated in later versions; it is recommended to
migrate to the newer syntax, but the old syntax is still supported.
Bug: b/382395049
Change-Id: I9150983084b91279e4f4587a80737e6813937cd6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6083215
Commit-Queue: Anne Redulla <aredulla@google.com>
Reviewed-by: Peter Boström <pbos@chromium.org>
Owners-Override: Anne Redulla <aredulla@google.com>
The Windows global Git config bootstrapping shows a warning if you have
not agreed to depot_tools automatically managing your global Git config.
To silence this warning, a user must either:
(1) explicitly allow to automatic management; or
(2) explicitly deny automatic management.
This CL adds a third way to prevent the warning:
(3) The existing global Git config already has the desired values.
Consequently, depot-tools.gitPostprocessVersion is redundant
and has been removed.
Bug: b/382395049
Change-Id: I18260962ee9647578e61993b191e9f76e99b342b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6072987
Commit-Queue: Anne Redulla <aredulla@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
This CL makes searching for an existing system installation of Git
the default behavior.
If a direct Git installation is not found, a warning will be
logged and the bundled Git for Windows will be used instead.
Bug: b/360206460
Change-Id: I48d68b2bf193865ca573199b42e7838c28f1e3cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6068030
Reviewed-by: Allen Li <ayatane@chromium.org>
Commit-Queue: Anne Redulla <aredulla@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Git has been using version 2 of their wire protocol by default since
2.26, released in 2020. Stop setting it explicitely.
Change-Id: Ibc93a672b41c5a8183bc3200c506006f6e08af94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6070782
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Modifying the system-level Git config may require admin privileges,
depending on where Git was installed.
This CL makes the bootstrap.py script target a user's Git config
at the global level, instead of system level.
Checks the global Git config for postprocess version and explicit
enabling of global config changing. Logs a warning if out of date
and not enabled so the user knows how to agree to global config
changes.
Bug: b/379888465, b/360206460
Change-Id: I9be395b64d5429f85514397918f4a6140dfe2a1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6034204
Reviewed-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Anne Redulla <aredulla@google.com>
By default it's false and the bundled git is used.
Bug: b/379888465
Change-Id: I7d3d91da2ade6534d5b80479a050d6f608c16b2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6033861
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Anne Redulla <aredulla@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Enhanced the function to use a try-catch block around os.path.commonpath
to gracefully handle cases where file paths are located on different drives.
This ensures compatibility and prevents errors related to drive differences.
R=aredulla@google.com, ayatane@chromium.org, sokcevic@chromium.org
Bug: b/360206460
Change-Id: Iee51ba282fd85d211194d8678765a72783727db5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6018123
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
With this change, python2[.bat] will no longer be available in
depot_tools root. vpython continues to work.
Bug: 1376538
Change-Id: Iabe22e4e33d0d79d258068c90128da8de4d3ece1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5170265
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Brian Ryner <bryner@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
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>
On windows paths with spaces some cipd and depot_tools bootstrap commands were failing due to misquoting or syntax that didn't support such paths. This ensures that a clean bootstrap on a path such as "C:/Foo Bar/depot_tools" works as expected.
Change-Id: Ib516d16ed7809635369399f3df0eff2269ff6e2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3834965
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
This version has a native package available for mac-arm64.
Bug: 1184766
Change-Id: Ifb9b067ec94522ec05b544db0828cb18240965cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3127607
Reviewed-by: Jonathan Nieder <jrn@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Brian Ryner <bryner@google.com>