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>
This is a reland of commit b5c7f4b46c
Original change's description:
> Drop py2 support in gerrit and git related files
>
> python3 is the only supported version of python in depot_tools.
>
> Bug: 1475402
> Change-Id: Ie4ee18d297081b3aa0206b8d7ce6461819bff0ca
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4809560
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Gavin Mak <gavinmak@google.com>
Bug: 1475402
Change-Id: I194180494071777b7b9dd91a5c8edabbbf5484c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4811218
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
This reverts commit b5c7f4b46c.
Reason for revert: missing a replace for urlparse.urlparse
Original change's description:
> Drop py2 support in gerrit and git related files
>
> python3 is the only supported version of python in depot_tools.
>
> Bug: 1475402
> Change-Id: Ie4ee18d297081b3aa0206b8d7ce6461819bff0ca
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4809560
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Gavin Mak <gavinmak@google.com>
Bug: 1475402
Change-Id: Idd00fdfe0b3d62785da2789a7dfcc9fbc79b6385
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4811623
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
python3 is the only supported version of python in depot_tools.
Bug: 1475402
Change-Id: Ie4ee18d297081b3aa0206b8d7ce6461819bff0ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4809560
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Remove default value from optional arguments, since they are always passed.
In particular, the default value for `out` was a text stream (sys.stdout),
but the value passed to `out` is always a binary stream, which is confusing.
Get rid of the `err` argument, since it is always sys.stderr, and only used
for testing.
Change-Id: Ia289e9a97b968a0c802fc2f419397c1e494f713c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1986064
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
git hyper_blame might use a subprocess' stdin for its stdout,
which is opened to accept byte input.
The text must be encoded before printing to stdout to avoid
unicode errors.
Bug: 1028709
Change-Id: If2a270a7f3f69a818d367616f6732245de364db9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1937500
Reviewed-by: Andy Perelson <ajp@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Previously, it counted the number of UTF-8 bytes when spacing out the
table, not the number of code points.
Bug: 808905
Change-Id: Ice5504089e0f7097e108c6dfbbb810620b9dfc94
Reviewed-on: https://chromium-review.googlesource.com/901142
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
This could, in extreme cases, result in a crash due to the wrong line
number being out of bounds of the file line count.
BUG=709831
Change-Id: I08ec75362d49c4a72e7ee9fd489d5f9baa6d31bd
Reviewed-on: https://chromium-review.googlesource.com/472648
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
This was broken in r299682 (adding setup_color). git_hyper_blame now
initializes setup_color.
BUG=607771
Review-Url: https://codereview.chromium.org/1930813003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300316 0039d316-1c4b-4281-b951-d872f2087c98
Added --ignore-file argument, so you can specify ignored commits in a
file rather than as raw command-line arguments. Also, automatically
searches for a file called .git-blame-ignore-revs, which is
automatically used as an ignore list by default.
Also, specifying an unknown revision (either on the command line or in a
file) now generates a warning, not an error.
Notes on some decisions:
- The file is called .git-blame-ignore-revs (not mentioning hyper-blame)
because we may use the same list in tools other than hyper-blame in
the future.
- We look at the *currently checked out* version of
.git-blame-ignore-revs (not the version at the specified revision) for
consistency with .git-ignore. Because we only expect revisions to be
added (not deleted), it should be fine to use an ignore list from a
newer version than the revision being blamed.
- We considered using git notes for the ignore list so that you could
add a revision to the ignore list without needing a follow-up CL.
However, there are some problems with this approach. git notes is not
automatically synced with git clone/pull. Also the Chromium infra
tools (Reitveld, CQ) are not set up to allow modification of git
notes, nor are changes to git notes subject to OWNERS checks. Using a
regular file ensures all users synced to a particular revision are
using the same ignore list.
BUG=574290
Review URL: https://codereview.chromium.org/1697423004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298897 0039d316-1c4b-4281-b951-d872f2087c98
Previously, when a commit was skipped, it would be blamed on the line
number the line had *after* the skipped commit. This could mean a
totally unrelated commit gets blamed. Now, a heuristic analyses the diff
of the skipped commit to discover approximately what line number the
line had *before* the skipped commit, so it can hopefully be blamed on
the right commit.
BUG=574290
Review URL: https://codereview.chromium.org/1629253002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298609 0039d316-1c4b-4281-b951-d872f2087c98
Currently, the script requires you to pass the unwanted commits on the
command line, but eventually, you could configure it with a file
(checked into the repo) that provides a fixed set of commits to always
skip (such as commits that do a huge amount of renaming and nothing
else).
BUG=574290
Review URL: https://codereview.chromium.org/1559943003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298544 0039d316-1c4b-4281-b951-d872f2087c98