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>
python3 is the only supported version of python in depot_tools.
Bug: 1475402
Change-Id: I17174d7252b5cbf698700333d3cd561c6591d0a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4809190
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Ran "2to3 -w -n -f print ./" and manually added imports.
Ran "^\s*print " and "\s+print " to find batch/shell scripts, comments and the like with embedded code, and updated them manually.
Also manually added imports to files, which used print as a function, but were missing the import.
The scripts still work with Python 2.
There are no intended behaviour changes.
Bug: 942522
Change-Id: Id777e4d4df4adcdfdab1b18bde89f235ef491b9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1595684
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
This fixes the case where a new workdir is created from a repository
which was previously created with gclient-new-workdir.py and that
repository is later deleted, rendering the symbolic links created by
gclient-new-workdir.py invalid.
It also fixes support_cow() returning 'True' in that case because 'cp
--reflink' does not fail when copying a symlink.
Bug: 721585
Change-Id: I84f4d80b8698af0da346be559d46a328ec0d0e9b
Reviewed-on: https://chromium-review.googlesource.com/842402
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
gclient-new-workdir.py should work on systems not supporting reflink now.
Bug: 728903, 721585
Change-Id: I1385c4281bbf61d4ccae64c3595a39972fbe9d9e
Reviewed-on: https://chromium-review.googlesource.com/522232
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
If the repo is a btrfs subvolume, take a snapshot instead of using
"cp --reflink". Taking a snapshot is much faster, and uses less
disk space for metadata.
Bug: 721585
Change-Id: I97753dc30d46ff56d84d65f8d815c19d09cf104b
Reviewed-on: https://chromium-review.googlesource.com/513586
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
On filesystems supporting copy-on-write, like Btrfs and ZFS, use
"cp --reflink" to achieve faster speed and lower disk space usage.
Option --reflink and --no-reflink can override the automatic detection.
When reflink is supported, toolchains, support libraries, and artifacts
would also be preserved. This means you can do incremental builds right
after creating a new workdir.
For Linux Chromium checkout, one additional workdir only takes 0.8~1 GB
disk space in Btrfs, including data and metadata, depending on how many
artifacts are there inside the out*/ directories.
Change-Id: I8b913efba9e5afaeea2adc1c10a561f63cb50282
Bug: 721585
Reviewed-on: https://chromium-review.googlesource.com/499567
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
This makes it easier to add options to this script.
There should be no functional changes except for slightly different
text output.
Change-Id: I4d68a8c4aa0c159eae9435fe962e53f6f09d2d47
Reviewed-on: https://chromium-review.googlesource.com/499527
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
This uses the same trick as git-new-workdir to reuse an existing git
checkout without interfering with it. However, this makes it only usable
on platforms where os.symlink exists.
BUG=404755
Review URL: https://codereview.chromium.org/1342383002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296920 0039d316-1c4b-4281-b951-d872f2087c98