Commit Graph

6918 Commits (cca5c49d45e0307cd8565ee62061636c5199f930)
 

Author SHA1 Message Date
Erik Staab cca5c49d45 Add timestamp info to presubmit logs for easier debugging.
Change-Id: I80f53f1130ba1dd17c886b14a5737d30394604f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2152004
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Erik Staab <estaab@chromium.org>
5 years ago
Andrew Grieve fc5e103221 Fix "git freeze" failing on broken symlinks
Fixed by switching "stat()" to "lstat()".

Does not seem to be a python3 vs python2 thing (fails on py2 as well).

Bug: 1071066
Change-Id: I7eea9ed39b43e09ae2f7558bf23c12581f02e4a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2150507
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
5 years ago
Edward Lesmes e1a9c8db7e Reland "metrics: Use vpython3 instead of sys.executable"
This is a reland of 310e1e814d

Use subprocess2, which will set shell=True when running on Windows.

Original change's description:
> metrics: Use vpython3 instead of sys.executable
>
> Apparently, uploading metrics might happen after sys.executable
> has been deleted.
>
> Bug: 1068263
> Change-Id: Id4ab465bb97d146b688f42fb2002e29372e65555
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2148879
> Commit-Queue: Anthony Polito <apolito@google.com>
> Reviewed-by: Anthony Polito <apolito@google.com>

Bug: 1068263
Change-Id: I19c915f3e8862ae3248b01e0eccdbdf0bfda7369
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2150170
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lesmes 8073a50204 gclient: Set with_branch_heads if asked to sync to refs/branch-heads/*
The bug is caused because we already have refs/branch-heads/XXXX locally,
so we don't attempt to fetch it again, even if it has been updated.

This solution is a bit of a hack to make sure that we fetch
refs/branch-heads/*, which is the most common case for this to fail.

Bug: 1070545
Change-Id: Iec7cfff18219794230188e2b9e901c587acd274b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2149849
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
5 years ago
Edward Lesmes 3820520acb Revert "metrics: Use vpython3 instead of sys.executable"
This reverts commit 310e1e814d.

Reason for revert:
"vpython3" doesn't work on Windows without shell

Original change's description:
> metrics: Use vpython3 instead of sys.executable
> 
> Apparently, uploading metrics might happen after sys.executable
> has been deleted.
> 
> Bug: 1068263
> Change-Id: Id4ab465bb97d146b688f42fb2002e29372e65555
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2148879
> Commit-Queue: Anthony Polito <apolito@google.com>
> Reviewed-by: Anthony Polito <apolito@google.com>

TBR=ehmaldonado@chromium.org,apolito@google.com,infra-scoped@luci-project-accounts.iam.gserviceaccount.com,sokcevic@google.com

Change-Id: I6b9998de0d3afeda142971f889361fb1c8a37a0d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1068263
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2149762
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Anthony Polito 81d1767216 upgrade git to 2.26.1
Bug: 1070694
Change-Id: I47def761c61ea62f44aa891f869383b9a0a56d2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2149755
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Anthony Polito <apolito@google.com>
5 years ago
recipe-roller 371d59454e Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (recipe_engine) into this repository.

recipe_engine:
  https://crrev.com/ca1b8188e76bd1a66d92bc420e674fb1b5ce81fb (yiwzhang@google.com)
    [warning] Implement warning recorder to record execution and import warnings
  https://crrev.com/af5b235945d6de010d29240863a6c1d5910c9047 (yiwzhang@google.com)
    [warning] provide functionality to escape warnings
  https://crrev.com/8d094c42eda98ce18f2f09c95ab3c0c75f9abb07 (yiwzhang@google.com)
    Refactor to use RawResult message instead of Result across the engine

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

TBR=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Idf03c53eec502cc5cee37995a1817dadacea455c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2149754
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
5 years ago
Robert Iannucci 52b9929d47 Fix recipe autoroller account.
R=ehmaldonado@chromium.org,apolito@google.com

Change-Id: I804488c86b864d330be8b667c64f58f3541f0197
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2149851
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Anthony Polito <apolito@google.com>
5 years ago
Edward Lesmes 310e1e814d metrics: Use vpython3 instead of sys.executable
Apparently, uploading metrics might happen after sys.executable
has been deleted.

Bug: 1068263
Change-Id: Id4ab465bb97d146b688f42fb2002e29372e65555
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2148879
Commit-Queue: Anthony Polito <apolito@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
5 years ago
recipe-roller e0950f3cd2 Roll recipe dependencies (nontrivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (recipe_engine) into this repository.

Please review the expectation changes, and LGTM+CQ.

recipe_engine:
  https://crrev.com/fc83ebe9d2ed46c6b7147997a6987e0f42d962f4 (mohrr@google.com)
    [recipe_modules/cipd] Use -max-threads by default

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

R=recipe-roller@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I7cf134b39e333cecc54868416a13248e104ca386
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2140624
Auto-Submit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
5 years ago
Johnny(Jianning) Ding 08f4d59e0b Decode the returned encoded bytes of subprocess.check_all/check_output.
Bug: 1068779
Change-Id: Ie399e134577732b441c37ca2083d72a66bb631c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2142745
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Johnny (Jianning) Ding <jnd@chromium.org>
5 years ago
Yiwei Zhang b71a96f818 Replace customzied test failure assertion with ResultReasonRE from engine
This change is to facilitate the annotation protocol -> luciexe protocol
migration in the future. The failure response structure will be changed
after the migration. Therefore, we only need to change the
implementation detail of ResultReasonRE at that time.

R=iannucci

Change-Id: If5e0005dddcaf6ccdfbcb047e3855763cf4eadc5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2146066
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
5 years ago
Josip Sokcevic a01816b0ba Set git low speed detection on bot_update
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: release_scripts
Recipe-Nontrivial-Roll: skia
Change-Id: Iacf276bd53fdca37994b6d6fe1e5db71f844a3fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2147833
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
5 years ago
Quinten Yearsley 925cedba7b Run spellchecker on depot_tools
This was made by running `codespell` and `scspell`
and then checking the results.

Change-Id: I169fd5b40294f83015075b4a899fbca263821f25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2144602
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Auto-Submit: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Fumitoshi Ukai 4f3aff5fc2 Roll out new goma client binary VERSION=197
897c9f8406

Bug: b/152279383
Change-Id: Ia1800c6a6326ecf530a5c259c4051579d29780c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2147102
Auto-Submit: Fumitoshi Ukai <ukai@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>
Commit-Queue: Fumitoshi Ukai <ukai@chromium.org>
5 years ago
Andrii Shyshkalov e521cd14da Make vadimsh@ an owner of cipd*.
R=ehmaldonado, vadimsh

Change-Id: I8376663dfd6227175b3ccc46ea31038fbfa723b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2142734
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Roberto Carrillo 3c1ff62f4c [lucicfg] Update v1.13.0 -> v1.13.1
Main change is propagating resultdb integration option from
luci.builder(...) to cr-buildbucket.cfg

R=nodir,vadimsh,tandrii

Bug: 1027762
Change-Id: I6f03632857f45c6cc3c5c108b294bdaf0d560d6b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2142587
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
5 years ago
Peter Wen 3c1e7e7730 Add brucedawson@ to own post_build_ninja_summary.py
Bruce created the script and is most qualified to review changes to it.

Bug: None
Change-Id: I238c88ad03db422f9c7f5b2760ff2dd25d431e65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2141224
Commit-Queue: Peter Wen <wnwen@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
5 years ago
Peter Wen e3a42b258e More detailed build-step type summary for android
Increase the number of long times by extension to report from 5 to 10
since java build steps produce a number of different extension types. It
is difficult to distinguish between android vs non-android builds, so
increase this default for all platforms.

Prioritize .jar outputs for java targets and allow up to two levels of
extensions to be recognized.

e.g.
file.interface.jar would have .interface.jar as its full extension.
file.javac.jar would have .javac.jar as its full extension.

Some of these build steps require .jar outputs, which is why these
targets use a secondary extension to differentiate.

Example output: https://crrev.com/c/2142395

Bug: chromium:1067273
Change-Id: Id5780980f60841c3384d91bf96121c6dec3e8bed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2142163
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
5 years ago
Edward Lesmes c440b23d50 depot_tools: Execute commands using Python 2 on Windows when GCLIENT_PY3=0.
Change-Id: Ib51acc5671c7b60219f64bcb73a70f85a51779a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2140817
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
recipe-roller 48c5c9c504 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (recipe_engine) into this repository.

recipe_engine:
  https://crrev.com/42f6841b9e7d40b310e52425c71ca77dbe2ac1f2 (olivernewman@google.com)
    [analyze] Consider recipe resource files

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

TBR=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ieae5583e34dc42c2dde78b2561cfbe62365ec046
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2140371
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
5 years ago
Jose Lopes 3863fc52b9 Do not prompt on --dependencies if --force.
At the moment, specifying --dependencies to upload all dependent CLs
will always prompt for confirmation if --force was specified. This
means that there is no way to run this command in a batch way or from
another script, and it's also in contradiction to the --force flag
which is meant to answer 'yes' to all prompts.

This uses a pattern that is used several times in the script, which is
to check 'if not force: prompt()'.

Change-Id: I7d85b02b68d958a5b2d3295a04c4ced023d36ec8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2139700
Auto-Submit: Jose Lopes <jabolopes@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Vadim Shtayura 06c0b50c29 [lucicfg] Update v1.12.7 -> v1.13.0.
The most notable change is that invalid escape sequences in strings
cause errors now. This is due to an underlying starlark-go change.

R=tandrii@chromium.org, iannucci@chromium.org

Change-Id: I2fc8aa297000e5bcfd9c5f0cca7af205a8e77e80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2137983
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
5 years ago
Edward Lesmes 89624cdfd7 Reland "git-cl: Execute clang-format-diff.py using vpython."
This is a reland of 87661afbfc

Set shell=True on Windows, so that vpython.bat can be executed.

Original change's description:
> git-cl: Execute clang-format-diff.py using vpython.
>
> When running git-cl using vpython3, sys.executable is python3.
> Execute clang-format-diff.py using vpython instead, since it has
> not been migrated already.
>
> Bug: 1066187
> Change-Id: I31556acb50ff4256706a313c1393eddad9f903f3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2130926
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

Bug: 1066187
Change-Id: Ia482f13d0f30d625f2f6db3cb4202b7f3f95707b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2135330
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Bruce Dawson 19d4809e11 Use "call" in gclient.bat to restore title
The title of command prompt windows indicates what command is running.
However it is easy to confuse Windows so that it doesn't clear the
status when a program termintes. Apparently a tail from one batch file
to another is sufficient to do this. This change uses "call" to run
python to avoid this minor glitch, making is so that I can tell when
gclient has completed merely by glancing at the command prompt status
bar.

Change-Id: Ibd310362b8dd78589abc443be1841f0937c791fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2133303
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
5 years ago
Mike Frysinger 4ecdd22b0b repo: update to 2.5 launcher
Bug: None
Test: `repo sync` still works
Change-Id: I472e5f8753f96f1ad45c9782e4ac30b71a620ab5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2120252
Reviewed-by: Michael Mortensen <mmortensen@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
5 years ago
Peter Kasting cd454025b3 Revert "Reland "git-cl: Execute clang-format-diff.py using vpython.""
This reverts commit 87661afbfc.

Reason for revert: Still get:
OSError: Execution failed with error: [Error 2] The system cannot find the file specified.

Original change's description:
> Reland "git-cl: Execute clang-format-diff.py using vpython."
> 
> This is a reland of beec66070e
> 
> Append the clang-format directory to the front of PATH instead of
> overwriting it.
> This allows vpython to be invoked.
> 
> Original change's description:
> > git-cl: Execute clang-format-diff.py using vpython.
> >
> > When running git-cl using vpython3, sys.executable is python3.
> > Execute clang-format-diff.py using vpython instead, since it has
> > not been migrated already.
> >
> > Bug: 1066187
> > Change-Id: I31556acb50ff4256706a313c1393eddad9f903f3
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2130926
> > Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> 
> Bug: 1066187
> Change-Id: I8b65549ef47587cef8492f8f76a037eb85a981fc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2132972
> 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: I22566c829a83991e3749a039d0bd0ba7d8a56812
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1066187
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2133588
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
5 years ago
Josip Sokcevic 9db428f4f7 Revert "Tweak git bat template"
This reverts commit 4741a12797.

Reason for revert: % is escaped improperly

Bug: 1067065

Original change's description:
> Tweak git bat template
> 
> This fixes some issues with escaping, namely carets. For example,
> without this patch, when HEAD^^1 is passed to batch script, it will
> forward HEAD1 to git. With this patch, it will be forwarded as HEAD^^1
> to git. There is still issue with HEAD^1 which seems not possible to fix
> with batch script as batch receives HEAD1.
> 
> R=​ehmaldonado@chromium.org
> 
> Change-Id: Ibb48ef06b4f17df374ee983eaa19ca43a706fa22
> Bug: 1065307
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2130635
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Auto-Submit: Josip Sokcevic <sokcevic@google.com>

TBR=ehmaldonado@chromium.org,infra-scoped@luci-project-accounts.iam.gserviceaccount.com,sokcevic@google.com

Change-Id: Ib46517010fd49621b758fc9594cbd90f7ff4e89a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1065307
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2133309
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
5 years ago
Edward Lesmes 87661afbfc Reland "git-cl: Execute clang-format-diff.py using vpython."
This is a reland of beec66070e

Append the clang-format directory to the front of PATH instead of
overwriting it.
This allows vpython to be invoked.

Original change's description:
> git-cl: Execute clang-format-diff.py using vpython.
>
> When running git-cl using vpython3, sys.executable is python3.
> Execute clang-format-diff.py using vpython instead, since it has
> not been migrated already.
>
> Bug: 1066187
> Change-Id: I31556acb50ff4256706a313c1393eddad9f903f3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2130926
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

Bug: 1066187
Change-Id: I8b65549ef47587cef8492f8f76a037eb85a981fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2132972
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lesmes 5a5537dc63 git-cl: Fix retrieving gitcookies path.
Decode the result of reading http.cookiefile from git config

Bug: 1066992
Change-Id: I1d4f2c8e54f717ef61ab4e630f3f66206c56047e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2132774
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Josip Sokcevic 4741a12797 Tweak git bat template
This fixes some issues with escaping, namely carets. For example,
without this patch, when HEAD^^1 is passed to batch script, it will
forward HEAD1 to git. With this patch, it will be forwarded as HEAD^^1
to git. There is still issue with HEAD^1 which seems not possible to fix
with batch script as batch receives HEAD1.

R=ehmaldonado@chromium.org

Change-Id: Ibb48ef06b4f17df374ee983eaa19ca43a706fa22
Bug: 1065307
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2130635
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
5 years ago
Allen Bauer 845b830530 Fixed goma_ctl.bat to pipe to nul instead of creating a file called null.
Bug: 1066954
Change-Id: Icdf68547f94376616a21997c37cf51cd38659c5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2132954
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
5 years ago
Josip Sokcevic 7e0b333328 Fix git-* commands when using python3 on Win
R=ehmaldonado@chromium.org

Bug: 1065582
Change-Id: I434db17d4113cdf623ad733b65aa66b770766fb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2131468
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
5 years ago
Edward Lesmes 994bed5496 Fix Python3 integer division issue in roll-dep.
Change-Id: I43d1b9cecee3066c206b2cfdb2fa9d37bc5001e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2132232
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
5 years ago
Robert Iannucci 4f30cf0179 [man] Followup: Fix order of depot_tools in PATH in html docs
This is a followup to https://chromium-review.googlesource.com/2124657

TBR=ahaas@chromium.org, ehmaldonado@chromium.org

Change-Id: I0cf8a73a645865700dc8ce5c2d17cc1915706ca5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2131384
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
5 years ago
Edward Lesmes 43d002a2ca Revert "git-cl: Execute clang-format-diff.py using vpython."
This reverts commit beec66070e.

Reason for revert:
OSError: Execution failed with error: [Errno 2] No such file or directory: 'vpython'. 

Original change's description:
> git-cl: Execute clang-format-diff.py using vpython.
> 
> When running git-cl using vpython3, sys.executable is python3.
> Execute clang-format-diff.py using vpython instead, since it has
> not been migrated already.
> 
> Bug: 1066187
> Change-Id: I31556acb50ff4256706a313c1393eddad9f903f3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2130926
> 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: I555251d8dbb1582d7f03702b7910d70a11b75855
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1066187
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2130785
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lesmes 56dbf9a4b5 depot_tools: Don't use carets when checking if a revision exists.
On Windows, git can be either an executable or batch script, each of
which requires carets (^) to be escaped in different ways.

This makes it hard to use `git rev-parse --verify REV^{commit}`, so we
truncate full hash revisions to achieve the same effect instead.

Change-Id: I01578620706a1bab75a2decc55d9b4f1ac3afe28
Bug: 1065307
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2127968
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lesmes beec66070e git-cl: Execute clang-format-diff.py using vpython.
When running git-cl using vpython3, sys.executable is python3.
Execute clang-format-diff.py using vpython instead, since it has
not been migrated already.

Bug: 1066187
Change-Id: I31556acb50ff4256706a313c1393eddad9f903f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2130926
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lesmes a680c23e78 git-cl: Fix checking if parent branch has been uploaded.
The old behavior was to set parent from the gerritsquashhash of the
parent branch, but now it's trying to set it from the gerritsquashhash
of the current branch (which doesn't exist yet).

As a result it's always saying `Upload upstream branch ... first`

Change-Id: I035ed128f46a49d09d563ea589e9ca9eb7b87db9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2128679
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Andreas Haas 71417ad5d3 [man] Fix order of depot_tools in PATH
For development in V8, and I guess also in Chrome, it is important that
depot_tools are at the beginning of $PATH. This was explicitly mentioned
in the original tutorial. However, it seems like a cleanup CL changed
this recently, see https://crrev.com/c/1593820. This CL changes the
order in $PATH back to the original order.

CC=marja@chromium.org, dmcardle@chromium.org
R=iannucci@chromium.org

Change-Id: Idaed3ada05cddd666734c03a25503fe5dc481e3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2124657
Auto-Submit: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur 447507ed82 git-cl: Move GCE detection when creating a connection.
Print it unconditionally when creating the HTTP connection.
The previous check was not capturing all possible failure modes.

Change-Id: Ie519f3c3afdbb2e452fbea2385cd75c3d5d1af84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2129148
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lesmes 17ffd9875c git-cl: Fix git-cl split.
Change-Id: I6ca167e34829cd7694372923917446c3843c879f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2129146
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Dale Curtis 0610193326 Don't delete dormant branches, even if empty.
1) The current behavior feels contrary to the documentation; which says
"If true, will cause rebase-update to skip all processing on the branch."

2) The new behavior allows a workflow where 'master' is empty and
marked dormant, but kept up to date as the parent for all other
branches.

Change-Id: Ic7440706a69753f796846dd84ecbf8bcf172ba4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2128675
Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lesmes df70c81527 depot_tools: Simplify MinGW check.
Check `if [[ $(uname -s) = MINGW* ]]` instead of using
grepping and an additional variable.

Change-Id: I6f2cfbb6743357125e6672b77667ee5e36d3d81e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2127674
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
5 years ago
Edward Lesmes 50da7706ce Reland "git-cl: Remove unused and duplicate functions."
This is a reland of e3a49aa405

GetRelativeRoot was fixed to use '.' instead of None

Original change's description:
> git-cl: Remove unused and duplicate functions.
>
> 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>

Change-Id: I54bd1d34d3501a38bf8af2f9e70059d58fa538a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2125293
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lesmes 648b4cd2ca Add quotes around paths in bash scripts
Follow up to crrev.com/c/2125626.

This allows depot_tools commands to run successfully when depot_tools is
installed in a path containing spaces.

Change-Id: I8f99dbdcb3b1acf27d51ce26b6153f643b8d4dcd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2127675
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
5 years ago
John Stiles 11f4a84bb1 Add quotes around paths in bash scripts.
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>
5 years ago
recipe-roller 1c4e06b7d7 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (recipe_engine) into this repository.

recipe_engine:
  https://crrev.com/c7bd3cd4eb151ae7a00352e1180ab7ec6933a71e (olivernewman@google.com)
    [autoroll] Don't gen docs if no_docs is set

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

TBR=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I006885495c8be7ce86d4dd876db656ef96c8d7fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2127239
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
5 years ago
Josip Sokcevic 6a7e234b58 Fix Windows unit tests for roll-dep and use py3
R=ehmaldonado@chromium.org

Change-Id: I5bf1aa21a5ae9b90dbab4cc0439ca19e73de337f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2125221
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
5 years ago
Bruce Dawson b73f8a96ec Make git cl status use bold colors
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>
5 years ago