A lot of scripts like to compute the dirname of $0 to find itself to
load more files. Have some scripts export & resuse this value so we
avoid recalculating when not needed.
Bug: 1469696
Change-Id: I3aac2e6119dbfa3c68715208df2786f67cdce92e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4750430
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Other depot_tools scripts use dirname regardless of mingw,
so do that here too to simplify.
Bug: 1469696
Change-Id: Ia3c22a4eb72e62564eee1e8b18a88671c8b8b9a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4748852
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
This was added long ago to workaround svn behavior with symlinked dirs.
We haven't used svn in years, so drop this logic to simplify.
Bug: 1469696
Change-Id: Ic881ec74b1a3caa002a131be48259a56be30d4f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4745419
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Running each bootstrap in serial seriously slows things down, and it
gets worse as we add more. On my very expensive desktop, the no-op
case takes 5 seconds. When running in parallel, it's now ~1.5 sec.
Change-Id: I4304fddf22ef5a718218a807aeb05e08e5418bb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3245746
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Don't call ensure_bootstrap from update_depot_tools.
ensure_bootstrap also updates gsutil and all versions of pylint
which is slow, particularly on MinGW.
Original change's description:
> depot_tools: Bootstrap Python 3 on Linux/Mac
>
> This will make it possible for developers to execute depot_tools
> scripts using Python 3 in a known environment.
>
> Bug: 1002153
> Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Bug: 1002153
Change-Id: Ia7579e440438897ba4a7c65a8b228dcfe7f28c86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1810040
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This reverts commits 0e85f633c7 and 9d25ad4192.
Reason for revert:
Causes problems for MinGW users.
Original change's description:
> Reland "depot_tools: Bootstrap Python 3 on Linux/Mac"
>
> This is a reland of dbca865e55
>
> Original change's description:
> > depot_tools: Bootstrap Python 3 on Linux/Mac
> >
> > This will make it possible for developers to execute depot_tools
> > scripts using Python 3 in a known environment.
> >
> > Bug: 1002153
> > Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
> > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> > Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> > Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
>
> Bug: 1002153
> Change-Id: I6938a76ffa05366c21f7c56aed3d07ecb2b84443
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1798845
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
TBR=iannucci@chromium.org,dpranke@chromium.org,tandrii@google.com,ehmaldonado@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 1002153
Change-Id: I3ee87b95b2532ec694d7f4f87cce8cde8ccf86eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1808137
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This is a reland of dbca865e55
Original change's description:
> depot_tools: Bootstrap Python 3 on Linux/Mac
>
> This will make it possible for developers to execute depot_tools
> scripts using Python 3 in a known environment.
>
> Bug: 1002153
> Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Bug: 1002153
Change-Id: I6938a76ffa05366c21f7c56aed3d07ecb2b84443
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1798845
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This reverts commit dbca865e55.
Reason for revert:
Fails on Mac
$ gclient sync --with_branch_heads
awk: syntax error at source line 1
context is
match($0, >>> /cpython3\/.*version:([.0-9a-zA-Z]+)/, <<<
awk: bailing out at source line 1
Could not extract Python 3 version from manifest.
Original change's description:
> depot_tools: Bootstrap Python 3 on Linux/Mac
>
> This will make it possible for developers to execute depot_tools
> scripts using Python 3 in a known environment.
>
> Bug: 1002153
> Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
TBR=iannucci@chromium.org,dpranke@chromium.org,tandrii@google.com,ehmaldonado@chromium.org
Change-Id: I8e03a9e22655491d0f8e8d214d04ba749c2ab8ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1002153
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1797197
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This will make it possible for developers to execute depot_tools
scripts using Python 3 in a known environment.
Bug: 1002153
Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
This allows people to pin a specific version of pylint when running
it. The default behavior is unchanged: we run pylint-1.5.6 still
as we've created a vpython wheel in cipd for it. But for projects
that want to move to a newer version, they can pick any of the new
1.x wrappers. Having the full set of versions here allows projects
to incrementally move to newer versions as the lint delta between
1.5 & 1.6 tends to be much smaller than 1.5 & 1.9.
We don't include support for the newer 2.x series as those only
support Python 3 which the codebase isn't ready for.
Bug: 866772
Test: `./pylint ...` still works & shows pylint-1.5
Test: `./pylint-1.5 ...` runs the v1.5 version
Test: `./pylint-1.8 ...` runs the v1.8 version
Change-Id: I7c47187493564db81e3eb28c6dbd09e6309ead46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1752507
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Add a "ensure_bootstrap" script, which syncs the bootstrapped state of
"depot_tools" so that remaining operations become read-only.
BUG=chromium:769369
TEST=local
Change-Id: I2dab36112b378a926d8201d2ab31a7daa9f5da29
Reviewed-on: https://chromium-review.googlesource.com/691318
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>