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 macOS, it failed with:
Exception in thread git-retry.tee.stderr:
Traceback (most recent call last):
File "/path/to/cipd's/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "$HOME/depot_tools/git_retry.py", line 36, in run
self.out_fd.write(line)
TypeError: write() argument must be str, not bytes
Change-Id: Ib2a77731dee10b6bb2a2ea2a7ffeaf1165e15df6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3873929
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Currently, when the Infra Git wrapper is installed in PATH and a user
calls "git retry", the "git_retry.py" script is supposed to ignore the
request and fall through to the underlying command, relying on the Git
wrapper to handle retries.
However, Git apparently prepends its own executable path to PATH when it
is called, preventing the Git wrapper from being invoked the second time
and removing retries altogether.
We circumvent this by removing Git's new PATH influence when falling
through.
BUG=chromium:721450
TEST=local
- Ran locally before and after patch, confirmed that after
successfully retries throgh the wrapper.
R=agable@chromium.org, iannucci@chromium.org
Change-Id: Iae3d7a8bf805a5ba2bf827b06006a990d94e96d9
Reviewed-on: https://chromium-review.googlesource.com/506374
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
If the Infra Git wrapper is managing a Git execution, "git_retry" will
impose a second set of retries. Recognize this situation and disable
"git_retry" so that the Git wrapper is the sole managing process.
BUG=chromium:703868
TEST=local
- Ran with and without environment variable, seems to work.
Change-Id: I4f749c9693a761abe2a062ed5f1dc09f51c69e30
Reviewed-on: https://chromium-review.googlesource.com/469229
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Handle KeyboardInterrupt gracefully rather the printing a
backtrace. Most users of these tools don't expect a
backtrace when then hit Ctrl-C.
Also, fix a few other inconsistencies found in the python
startup code of these different scripts:
- always call main function 'main' (rather than 'Main')
- always return 0 from main function
- if main takes args never include argv[0]
Review URL: https://codereview.chromium.org/955993006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294250 0039d316-1c4b-4281-b951-d872f2087c98
Added the 'git-retry' bootstrap command. This can be used to wrap other 'git'
commands around a fault-tolerant retry wrapper.
BUG=295109
TEST=localtest
R=iannucci@chromium.org, petermayo@chromium.org
Review URL: https://codereview.chromium.org/401673003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@285939 0039d316-1c4b-4281-b951-d872f2087c98