This allows git-cl to run successfully when the depot tools are installed to a path with a space in it.
Change-Id: I79fa44d13f89fb0ee1baaa90961b4c4284913c40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2125626
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Normal weight colored text can be hard to read, especially over Chrome
Remote Desktop (video compression treats chroma harshly). Git colors can
be made more readable by editing .gitconfig, but git cl colors are hard
coded. This hard codes them to all be bold, for greater readability and
effective brightness, and changes the still-too-dim-over-CRD blue to red.
Magic bold code found here:
https://stackoverflow.com/questions/8924173/how-do-i-print-bold-text-in-python
Change-Id: If3a8684d1886291ca692d6fdbe7e30095a5acbc8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2116941
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
On an initial upload, git-cl upload -t <title> should append <title>
before the change description.
This broke because options.squash is set to a default value very late
into code execution, so its value was not available when computing the
initial description.
options.squash is now set when parsing the options, early into code
execution.
Bug: 1064905
Change-Id: I04a18c572dd5b04a3013d39f71bc43d026ea85d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2122324
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This reverts commit e2ac022f0b.
git-cache issues were solved by https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2120966
Original change's description:
> Reland "depot_tools: Run using Python 3 by default."
>
> This is a reland of 01ed358917
>
> * python_runner.sh, gclient, roll-dep and fetch will call vpython
> (instead of vpython3) when running on Windows under git-bash.
> * vpython3 now detects when running on Windows under git-bash and
> executes vpython3.bat instead.
> * vpython3.bat calls python3.exe directly instead of calling python3.bat.
>
> Original change's description:
> > depot_tools: Run using Python 3 by default.
> >
> > Run gclient, roll-dep, fetch and custom git commands (i.e. git-cl, git-rebase-update, git-new-branch, etc.)
> > using vpython3 by default.
> >
> > Change-Id: I4eecddafa6ca4c5f82ec097615c79d2a741613e7
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2113550
> > Reviewed-by: Anthony Polito <apolito@google.com>
> > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
>
> Change-Id: I9829141d7ea26a67e655264430151f493e73a930
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2118418
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Anthony Polito <apolito@google.com>
Change-Id: Iff02533f0a11062f335a010c074043c720d5b2ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2121304
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This fixes default value for Windows platform. Unit tests still don't
work for Windows as CTRL+C handling is not working properly.
Change-Id: I11fd33279313bfd7a2070e90164da6cf9f63696e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2121555
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
The storage.* links do not work unless an individual object is
specified. This isn't the case for recursive upload/copy operations.
When uploading multiple objects recursively, we should use the console
link instead.
Bug: None
Test: Updated recipe expectations.
Recipe-Nontrivial-Roll: build
Change-Id: I511f04f367f6c20c538b3c2093a40807323d7b75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2118421
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Alex Drexler <adrexler@google.com>
This can happen if the cache repo was init'd, but has no pack files;
previously it would try to fetch from scratch.
Change-Id: I71689e30bdede392588c69e118e9297d86a134a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2120281
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
gclient_smoketest takes the longest to run among all tests.
Split it so that presubmit takes less time overall, and is
less likely to exceed the time limit.
Change-Id: I5a4f714b98f59a2e46bae944a043ad41b6786c25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2121154
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This reverts commit e9013eeb3d.
Reason for revert: https://crbug.com/1064547
Original change's description:
> Reland "depot_tools: Run using Python 3 by default."
>
> This is a reland of 01ed358917
>
> * python_runner.sh, gclient, roll-dep and fetch will call vpython
> (instead of vpython3) when running on Windows under git-bash.
> * vpython3 now detects when running on Windows under git-bash and
> executes vpython3.bat instead.
> * vpython3.bat calls python3.exe directly instead of calling python3.bat.
>
> Original change's description:
> > depot_tools: Run using Python 3 by default.
> >
> > Run gclient, roll-dep, fetch and custom git commands (i.e. git-cl, git-rebase-update, git-new-branch, etc.)
> > using vpython3 by default.
> >
> > Change-Id: I4eecddafa6ca4c5f82ec097615c79d2a741613e7
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2113550
> > Reviewed-by: Anthony Polito <apolito@google.com>
> > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
>
> Change-Id: I9829141d7ea26a67e655264430151f493e73a930
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2118418
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Anthony Polito <apolito@google.com>
TBR=ehmaldonado@chromium.org,ajp@chromium.org,apolito@google.com,infra-scoped@luci-project-accounts.iam.gserviceaccount.com,sokcevic@google.com
Change-Id: Ia382d6e4e330f5a7a7a62e4d369c3fa16fc17333
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2120956
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
This option lets users specify a format of the archive tags. E.g.
git cl archive -p 'archived/{issue}-{branch}'
makes tags in the format
archived/1234-foo-feature
Change-Id: Icb74cc68781cda21a70c802bd640543e92ae97a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2116723
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
Remove unused functions, and use scm.GIT where possible to reduce
duplication.
Change-Id: I24f05e7b3ae04743e97b6665ee668f44d6acc294
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2116938
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This is a reland of 01ed358917
* python_runner.sh, gclient, roll-dep and fetch will call vpython
(instead of vpython3) when running on Windows under git-bash.
* vpython3 now detects when running on Windows under git-bash and
executes vpython3.bat instead.
* vpython3.bat calls python3.exe directly instead of calling python3.bat.
Original change's description:
> depot_tools: Run using Python 3 by default.
>
> Run gclient, roll-dep, fetch and custom git commands (i.e. git-cl, git-rebase-update, git-new-branch, etc.)
> using vpython3 by default.
>
> Change-Id: I4eecddafa6ca4c5f82ec097615c79d2a741613e7
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2113550
> Reviewed-by: Anthony Polito <apolito@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Change-Id: I9829141d7ea26a67e655264430151f493e73a930
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2118418
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
This reverts commit 01ed358917.
Reason for revert: Broke tools on Windows with bash
Original change's description:
> depot_tools: Run using Python 3 by default.
>
> Run gclient, roll-dep, fetch and custom git commands (i.e. git-cl, git-rebase-update, git-new-branch, etc.)
> using vpython3 by default.
>
> Change-Id: I4eecddafa6ca4c5f82ec097615c79d2a741613e7
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2113550
> Reviewed-by: Anthony Polito <apolito@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
TBR=ehmaldonado@chromium.org,ajp@chromium.org,apolito@google.com,infra-scoped@luci-project-accounts.iam.gserviceaccount.com,sokcevic@google.com
Change-Id: If29ad72feaa215b8b282f2f6c9911700dd2f228c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2116728
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
gclient_utils.AskForData will use raw_input on Python 2 and input on Python 3.
Bug: 1063976
Change-Id: I93c059c4e4454d01787716b5a0a2641ad5253f53
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2116370
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Run gclient, roll-dep, fetch and custom git commands (i.e. git-cl, git-rebase-update, git-new-branch, etc.)
using vpython3 by default.
Change-Id: I4eecddafa6ca4c5f82ec097615c79d2a741613e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2113550
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Using the x86 binary is required for testing on Windows on Arm systems,
which can only emulate the x86 architecture at this time.
Change-Id: I28f01e3974b69ced4a96d8675adc024555791131
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2108724
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
This is a reland of 9f29465e52
Original change's description:
> git-cl: Refactor CMDUploadChange
>
> Changes:
> - Add _GetDescriptionForUpload and _GetTitleForUpload.
> - Add ensure_change_id to ChangeDescription, that ensures the
> description has a particular Change-Id.
> - If more than a Change-Id was entered on new issue upload, remove
> all, and add a new one.
>
> Change-Id: I0eae474eb07ea3036973b18571f72a80da425b21
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2101811
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Change-Id: Ib2c0ad61b169f6b0c3141674591b0d3fa42bc664
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2103532
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
GetUnitTests() has named params {run_on_python2, run_on_python3}.
This CL adds these params to GetUnitTestsRecursively() so they can be
forwarded to GetUnitTests().
Bug: https://crbug.com/1054018
Change-Id: I06ac25a37f94cdea1cdc91954b70113e54cfdd15
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2107610
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
The post_build_ninja_summary.py script, which autoninja automatically
runs if NINJA_SUMMARIZE_BUILD=1 is set, summarizes build time by file
extension. This is a good default summary but it can be handy to create
additional output categories. This change allows using fn_match style
wildcards to create additional categories which will then be summarized.
For instance:
python post_build_ninja_summary.py -C out/Def -s prec*.obj;blink*.obj
In addition the chromium_step_types environment variable can be set so
that when autoninja runs this script there will be additional summary
categories.
This has been used most recently when measuring the cost of creating and
using blink precompiled header files.
Bug: 1061326
Change-Id: I080b4ddd06d045a2351220e202cd9eec111bf00e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2093145
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
This reverts commit 9f29465e52.
Reason for revert:
line 2302, in CMDUploadChange
change_id = change_ids[0]
IndexError: list index out of range
Original change's description:
> git-cl: Refactor CMDUploadChange
>
> Changes:
> - Add _GetDescriptionForUpload and _GetTitleForUpload.
> - Add ensure_change_id to ChangeDescription, that ensures the
> description has a particular Change-Id.
> - If more than a Change-Id was entered on new issue upload, remove
> all, and add a new one.
>
> Change-Id: I0eae474eb07ea3036973b18571f72a80da425b21
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2101811
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
TBR=ehmaldonado@chromium.org,apolito@google.com,infra-scoped@luci-project-accounts.iam.gserviceaccount.com,sokcevic@google.com
Change-Id: Ibb76539066c103ec951fa8d02684bc10f84549bf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2103531
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Changes:
- Add _GetDescriptionForUpload and _GetTitleForUpload.
- Add ensure_change_id to ChangeDescription, that ensures the
description has a particular Change-Id.
- If more than a Change-Id was entered on new issue upload, remove
all, and add a new one.
Change-Id: I0eae474eb07ea3036973b18571f72a80da425b21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2101811
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
If the Change-Id in the description is different from the one fetched
from Gerrit, automatically set the right one instead of asking the
user to do so.
Change-Id: I0f681d9e7d98f3ed50adc4b6e4929981530e901c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2101368
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Interrupt tests after 3 min, so that failures can be
surfaced before the presubmit step gets interrupted
on the bot.
Change-Id: Ia0efebaac5a0c5072b974a4fbbcb14fe672017ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2098942
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>