Commit Graph

6754 Commits (8410164ab1222df526dbf81f728512a082318c5a)
 

Author SHA1 Message Date
Edward Lemur 1c8026d2f1 presubmit_support: Add --all-files options.
Will be set when --all is passed to git-cl presubmit to execute
presubmit checks over all files on a repo.

Bug: 1042324
Change-Id: I2ebb7c3ec633f9d3a3774314799aa056bc2919c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2003071
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
recipe-roller 1c6a8d32d6 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/f72daca5c12eb4d83d74c25465520380c169c6b2 (maruel@google.com)
    [swarming] Always trim output when raising an exception

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: Id6c7d59126fda025b50654148c7c8781674358fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2037870
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
Yuly Novikov e93101895e Also set LIBPATH in Windows toolchain environment
Needed to find *.winmd files for UWP build.

This CL and crrev.com/c/2007881 were used to generate the recent
toolchains with UWP support:
b92fff97f2e0323e99803f37f4b77b843bdbf69d in crrev.com/c/2015984 and
9ff60e43ba91947baca460d0ca3b1b980c3a2c23 in crrev.com/c/2025528.

Bug: chromium:1032635
Change-Id: I1ab0b6e11a30600deb377078815c268d8f9027e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2013579
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
5 years ago
Edward Lemur d7c06ac64d presubmit_unittest: Mock time_time for ThreadPoolTest
Mock time_time so that time.time is not called from ThreadPoolTest tests,
so that the execution time doesn't change between executions.

Bug: 1047631
Change-Id: I4f4ac30ca6a2ee3be25830c0e17a9f29a9c0c999
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2036477
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur e4d329cc00 presubmit_support: Add support for setting the change description.
Needed by Skia's PostUploadHooks, so that presubmit_support
doesn't depend on git-cl classes.

Bug: 1042324
Change-Id: I02475e346437b26fa8d0d2021ea62754077a2b5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2007262
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur 69bb8bef75 presubmit_support: Support getting and adding footers.
Needed by Skia's PostUploadHooks, so that presubmit_support doesn't
depend on git-cl internal classes.

Bug: 1042324
Change-Id: If8f4e6ea035197667cd9705a4274590c4d11511e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2007670
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Yuly Novikov 852d4aa1ba Don't drop windows.winmd when packaging Windows toolchain
It is needed for UWP build and is the same on at least 2 machines in
C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.18362.0\Windows.winmd

Bug: chromium:1032635
Change-Id: I9d7148a8dc11ea85f1b930f63ae19eaa58ac2bf6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2007881
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
5 years ago
Josip 906bfde9b6 Use logger where unit test has coverage
Change-Id: I0a4d16fef3aed6bba0c6015fe861a2f11558e11b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2029114
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
5 years ago
Tim van der Lippe 42a51f6af1 Enable Javascript formatting by default
This removes the need for explicitly passing `--js` to `git cl format`
to format both JavaScript and TypeScript. It would reduce a significant
amount of mental overhead for formatting code in DevTools frontend,
which is primarily JS/TS.

Fixed: 1007347
Change-Id: Ia35c9af677d12ce9be72fe5fcdd6ceb6cb039c5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2029371
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
5 years ago
Aaron Gable 4d67872733 Enable recipe-roller autosubmit
Bug: 773529
Change-Id: If00fae56890e7826f9a08ccafe7d45fff2d31ed0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2015615
Commit-Queue: Stephen Martinis <martiniss@chromium.org>
Reviewed-by: Stephen Martinis <martiniss@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Auto-Submit: Aaron Gable <agable@chromium.org>
5 years ago
Sylvain Defresne 4ada8ab49f [roll] Fix the command in the commit message
The CL https://crrev.com/c/chromium/tools/depot_tools/+/2031104 used
the full hash when calling "git log" to fix the roll on some bot. It
however resulted in the full hash visible in the commit message.

Fix the command included in the commit message while still using the
full hash in the command invoked.

Bug: none
Change-Id: I454e600fc34e554c1186ae9488ea4b0f7e7df310
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2031105
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
5 years ago
Sylvain Defresne ae2b962ce5 Tentative fix for roll-dep.py failing in generate commit message
Some bots run roll-dep.py and fail while generating the commit message
with the following error:

  src/ios/third_party/material_components_ios/src: Rolling from 54fd1dac39 to 5aaf54801f
  fatal: ambiguous argument '54fd1dac3..5aaf54801': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'

As "Rolling from 54fd1dac39 to 5aaf54801f" is printed, this mean that
the bot was able to resolve both HEAD and roll_to before invoking this
function, thus the corresponding hashes exists in the repository.

It is unlikely that shortening the hash to just the first nine chars
results in a collision, but there is no reason to use a short hash
when invoking git anyway, so use a separate variable to construct the
header of the commit with short hashes while invoking git with the
full hashes.

Also pass '--' after all the parameters to force git to interpret the
hash range as a range and not as a path.

This is a speculative fix.

Change-Id: Iaa2888610dcf8e20f9edc115a719791d573b83ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2031104
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
5 years ago
Florian Mayer ae510e8f08 Do not crash for non URL (i.e. SSH) remotes.
Without this change, having an SSH remote configured makes `git cl
archive` crash:

Traceback (most recent call last):
  File "/usr/local/google/home/fmayer/depot_tools/metrics.py", line 267, in print_notice_and_exit
    yield
  File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 5553, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 5535, in main
    return dispatcher.execute(OptionParser(), argv)
  File "/usr/local/google/home/fmayer/depot_tools/subcommand.py", line 252, in execute
    return command(parser, args[1:])
  File "/usr/local/google/home/fmayer/depot_tools/metrics.py", line 252, in _inner
    return self._collect_metrics(func, command_name, *args, **kwargs)
  File "/usr/local/google/home/fmayer/depot_tools/metrics.py", line 232, in _collect_metrics
    gclient_utils.reraise(exception[0], exception[1], exception[2])
  File "/usr/local/google/home/fmayer/depot_tools/metrics.py", line 205, in _collect_metrics
    result = func(*args, **kwargs)
  File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 3786, in CMDarchive
    for cl, status in statuses
  File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 3599, in get_cl_statuses
    cl.EnsureAuthenticated(force=False, refresh=True)
  File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 1757, in EnsureAuthenticated
    if urllib.parse.urlparse(self.GetRemoteUrl()).scheme != 'https':
  File "/usr/lib/python2.7/urlparse.py", line 143, in urlparse
    tuple = urlsplit(url, scheme, allow_fragments)
  File "/usr/lib/python2.7/urlparse.py", line 201, in urlsplit
    i = url.find(':')
AttributeError: 'NoneType' object has no attribute 'find'

Change-Id: I6f794f11d3ed5e3dbedfe278ded660fca32abda6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2030505
Commit-Queue: Florian Mayer <fmayer@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
5 years ago
recipe-roller 305542ea70 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/5a91e29d366be1e9e7c7e270a1da92790625c618 (tikuta@chromium.org)
    swarming: remove deprecated arg

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: I14bbc2e7281a0a29ae21e110b6e5a730307aec00
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2029118
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
recipe-roller 29e5a1af6c 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/7d4ed3e64183a01cba0ef7abfa6ca1a4e586cef7 (tikuta@chromium.org)
    swarming: update swarming client

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: I7f1620f22238a3ea6c27dc4066c1e722d3b138bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2029116
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 e827b0f7ec Adds support to edit description on git cl upload
git cl upload gets a new flag --edit-description, which allows user to
edit git commit message. It only works when updating existing CL.

Bug: 739928
Change-Id: Ia501dc31f32e1887a937d5df39aed03745376827
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2020591
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
5 years ago
Aaron Gable 1a0daf728c Let the presubmit recipe module skip owners checks when necessary
The circumstances under which this might happen are left up to the
invoking recipe, which in most cases is the chromium presubmit.py.

Bug: 1034114
Change-Id: Ia8db6ab0da04750d6753e6281ef859e19aea4039
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2018224
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
5 years ago
Anthony Polito ea8b58b970 add apolito to owners
Change-Id: I70191146494462302cdef5835f1c3c690a201b5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2025728
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Anthony Polito <apolito@google.com>
5 years ago
Fumitoshi Ukai 9d635962bc OWNERS: add ukai for cipd_manifest.*
goma team will release goma client cipd in depot_tools,
by modifying cipd_manifest.txt and cipd_manifest.versions

add ukai as OWNERS so that goma cilent release won't need
to wait for review.

Change-Id: I7f49d9c07b23d18c4a05ab11bea855d3f557a6ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2024208
Auto-Submit: Fumitoshi Ukai <ukai@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
5 years ago
Fumitoshi Ukai ca7b3bf330 roll out new goma client binary (VERSION=188)
6e253cdf85

BUG=b/145258781

Change-Id: Ic5f0f4895cce83e258b88a38ec22189a8c7b80d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2022403
Auto-Submit: Fumitoshi Ukai <ukai@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
5 years ago
John Budorick f437869d41 gclient: allow clients to pass deps_file name as config kwarg.
Bug: 1041701
Change-Id: I7c25d6b25eefc29f7a5e815d8664d5dfd2226cf5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2019018
Reviewed-by: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
5 years ago
Peter Kasting 1248b8ef4a Fix a python invocation that wasn't replaced with vpython.
This fixes autoninja on my Windows machine at home.

Bug: none
Change-Id: I3c245715c409bb2b30fcc3733bb097fc2a88f464
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2021755
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
5 years ago
John Budorick 0aa48cc1de presubmit: restore default 8-minute timeout.
This logic's predecessor, run_presubmit, used an 8-minute timeout in
all cases other than luci-py. Using that as a default (rather than 0s)
seems reasonable.

Recipe-Nontrivial-Roll: build
Change-Id: I4b8668531db1a243709979b580c5170c22a0729f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2020987
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
5 years ago
Anthony Polito 1a5fe23592 add revision to scheduleBuild call for git cl try if needed.
Bug: 1043877
Change-Id: I5363dc1ad7f6b7e0ce9ce9885c86e357c3c65339
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2016162
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Anthony Polito <apolito@google.com>
5 years ago
Aaron Gable bf4e7a722b [lucicfg] Update v1.11.17 -> v1.11.18
Changes:
  * Add cq group name to lucicfg graph (https://crrev.com/c/1986093)

Bug: 1035470
Change-Id: Iea5a57fdceadba45cb07bee8c13ba2cac1b62287
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2020583
Auto-Submit: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
5 years ago
recipe-roller 9403c3fc39 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/6163c134a0320158e9c0778f9ee532a81d03e0ed (agable@chromium.org)
    Remove recipe engine autoroller config

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: I9c45918675b2ae5647eed5531c4e53ea1bb4334b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2018226
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
Yannic Bonenberger 684096347b Improve git cl split
This CL changes the behavior of `git cl split` to split the change
by the size of the resulting CLs. For now, this is based on the number
of bytes changed, and not by the number of changed lines. Depending
on the shape of change, this may still produce more CLs than expected
(and possibly more than before).

A future change will switch the split to be based on the number
of affected lines, and also introduce a mode to base the split
on the number of affected files.

Bug: 998922
Change-Id: I49f868972a61b89b426ef9e2ceedc733eacb4350
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1778744
Commit-Queue: Yannic Bonenberger <yannic.bonenberger@gmail.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
5 years ago
recipe-roller bdd89366d3 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
  https://crrev.com/d5f7fbd67a6fb31d0491b5ba3e7f4a46c6668a37 Add autosubmit to recipes.cfg nontrival roll options (agable@chromium.org)


TBR=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I0e8c91742a5c5a34af015e993076eff7db272e6f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2013588
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
Gregory Nisbet 6a5aa6680c export PYTHONDONTWRITEBYTECODE instead of just defining constant
BUG=chromium:1040314
TEST=shellcheck
Change-Id: I237df73daad84aeebfc934c9ddcc3eb632598827
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1995993
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Gregory Nisbet <gregorynisbet@google.com>
5 years ago
recipe-roller d339e36642 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
  https://crrev.com/4ca9794b2e5b9fc85fd080bf5c19fa2d0f22cc3d [resultdb] Wait for tasks to complete (nodir@chromium.org)


TBR=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ic165d5ee3d4ad2563df02473ccf457547dfc266c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2013219
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
Andrii Shyshkalov 8effa4d063 git cl: warn when landing on chromium/src branch-heads.
Undos a hack added while CQ for branches was experimental.

R=ehmaldonado

Bug: 1043225, 753213
Change-Id: Ie88b61e61f59e828f0ac4a36cf4e356700305482
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2011308
Auto-Submit: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur b24ca5ac74 presubmit_support: Initialize Gerrit object when gerrit URL is given.
Only gerrit_url is needed to initialize gerrit_obj.
This will be needed for git cl to call presubmit support
as a script.

Bug: 1042324
Change-Id: I79d78fb67465f989755bf8c8ceb48d665464fa05
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2005050
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur 98cfac11bd scm: Add GetAllFiles method.
Will be used by presubmit_support to run checks over all files on a repo.

Bug: 1042324
Change-Id: I872b4eb7f287f3a4b14d753cad73d0c5d7beb00c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2002961
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur a5799e3bb4 presubmit_support: Use single quotes and convert to ArgumentParser.
Change-Id: I54f0fe3a2257166cba2a69659e5128e4ac9310bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2001707
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Andrii Shyshkalov 05b001c28d Roll bb tool to @ 9b687fbe
Old revision: b7405423

Change logs:
  infra/infra:
    b7405423..9b687fbe
  luci-go
    93937dc8..fa8b9bf0

Bug: 1041950
Change-Id: I79998caa77685240a61273d7f9a99b7fff2d0cd4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2005468
Auto-Submit: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: LaMont Jones <lamontjones@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
5 years ago
Raul Tambre e9730d75a0 subprocess2: Ensure environment keys and values are strings on Python 3
Example error during "git cl upload":
Traceback (most recent call last):
  File "C:\Google\depot_tools\presubmit_support.py", line 220, in CallCommand
    returncode, stdout = self._RunWithTimeout(cmd, test.stdin, test.kwargs)
  File "C:\Google\depot_tools\presubmit_support.py", line 204, in _RunWithTimeout
    p = subprocess.Popen(cmd, **kwargs)
  File "C:\Google\depot_tools\subprocess2.py", line 143, in __init__
    super(Popen, self).__init__(args, **kwargs)
  File "C:\Google\depot_tools\bootstrap-3_8_0b1_chromium_1_bin\python\bin\Lib\subprocess.py", line 390, in __init__
    errread, errwrite)
  File "C:\Google\depot_tools\bootstrap-3_8_0b1_chromium_1_bin\python\bin\Lib\subprocess.py", line 640, in _execute_child
    startupinfo)
TypeError: environment can only contain strings

Bug: 984182
Change-Id: Id996d73a80845aaeaa061107ed123627091cb600
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1815872
Commit-Queue: Raul Tambre <raul@tambre.ee>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
5 years ago
Edward Lemur 2a04803267 my_activity: Make compatible with Python 3.
Bug: 1009820
Change-Id: I2aa619eb1cc70f7cacd27cbc2afc5c04c3a77d1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2001224
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur 1c3b4bec47 subcommand: Add tests.
Change-Id: I730f364f30b0d211c2db6da0d6bb4f5ff3c948da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1999280
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Vadim Shtayura ce09ca54f8 [lucicfg] Update v1.11.14 => v1.11.17.
Changes:
  * luci.notifier_template(...) validates its name.
  * time.epoch(...) functions to parse timestamp strings into Unix times.
  * Internal digests.star module to calculate SHA256s.

R=iannucci@chromium.org

Change-Id: I58a3d9e11a2b278a0fd1e74169d6c57e048488f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2000986
Auto-Submit: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
5 years ago
Edward Lemur 59a3b2fd5d Run autoninja scripts using vpython.
Bug: 1002153
Change-Id: I769a5370d726f4ce478035f59bfd1df50fef452e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1992315
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lesmes 2247035813 metrics: Update documentation
The link that points to all known strings is outdated.

Change-Id: I40f7fd2b80fc0129eff5947ed6881d11934cb275
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1998084
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Anthony Polito <apolito@google.com>
5 years ago
Edward Lemur bce1ec1d57 Reland "presubmit_canned_checks: Run pylint on parent directory for depot_tools."
This is a reland of d3bfd23c6d

Don't modify cwd for paths other than depot_tools.

Original change's description:
> presubmit_canned_checks: Run pylint on parent directory for depot_tools.
>
> On Windows, scripts on the current directory take precedence over PATH.
> When pylint.bat calls vpython, it executes the vpython of the depot_tools
> under test instead of the one in the bot.
> As a workaround, run the tests from the parent directory instead.
>
> Change-Id: I7fa3f5b268df516194063ff39907ada18f7ef544
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1994216
> Reviewed-by: Anthony Polito <apolito@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

No-Presubmit: True
Change-Id: I4236ec17b2642ed7f53844af532ec1f5234b80d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1995783
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
5 years ago
Dean Berris a1266b63b5 Revert "presubmit_canned_checks: Run pylint on parent directory for depot_tools."
This reverts commit d3bfd23c6d.

Reason for revert: Breaks non-depot_tools based presubmits that use canned checks that expect the presubmit to be run in the sub-repository (for example, in Catapult where it's hosted in third_party/catapult instead of being directly in chromium).

Original change's description:
> presubmit_canned_checks: Run pylint on parent directory for depot_tools.
> 
> On Windows, scripts on the current directory take precedence over PATH.
> When pylint.bat calls vpython, it executes the vpython of the depot_tools
> under test instead of the one in the bot.
> As a workaround, run the tests from the parent directory instead.
> 
> Change-Id: I7fa3f5b268df516194063ff39907ada18f7ef544
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1994216
> Reviewed-by: Anthony Polito <apolito@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

TBR=ehmaldonado@chromium.org,apolito@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: If989527a53be90e1ae32cb3fa30f5e4777824480
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1994753
Reviewed-by: Dean Berris <dberris@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Dean Berris <dberris@chromium.org>
5 years ago
Jamie Madill 5e96ad12ac Re-land "git-cl: Fix format --dry-run not working with --full."
Re-land fixes format always saying the folder was dirty.

The --full option would skip setting the return value of the format
command when used with --dry-run. This in turn would cause the
presubmit check to always pass when --full was enabled in a repo by
default.

Was discovered in the ANGLE repository.

Bug: angleproject:4241
Change-Id: I986646336d1857af2826863ef4becbf2b9ee3049
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1993910
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lesmes 7a8bf94894 vpython3: Fix path to python 3
Bug: 1036606
Change-Id: I035250757e346f89390b36d44701f0b6b8d8d024
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1995888
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
5 years ago
Edward Lesmes dfadd9d7a2 Reland "vpython: Specify interpreter to run."
This is a reland of 797d74a266

Original change's description:
> vpython: Specify interpreter to run.
> 
> Specify the interpreter to run to avoid issues with several
> python installations on Windows.
> 
> Bug: 1036606
> 
> Change-Id: Ib70d041acc52c940711460219acd8f4ad58637a9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1992608
> Reviewed-by: Anthony Polito <apolito@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

Bug: 1036606
Change-Id: Ibf6727249b40c5a9f5f877353c8d42fe66404cf8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1994215
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur d3bfd23c6d presubmit_canned_checks: Run pylint on parent directory for depot_tools.
On Windows, scripts on the current directory take precedence over PATH.
When pylint.bat calls vpython, it executes the vpython of the depot_tools
under test instead of the one in the bot.
As a workaround, run the tests from the parent directory instead.

Change-Id: I7fa3f5b268df516194063ff39907ada18f7ef544
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1994216
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur b800fde565 git-map: Refactor and add simple tests
Change-Id: I8fd0034f6a6d7623792620f92208b25961fa174e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1990142
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lesmes 8b52ca7aa7 gsutil.vpython: Set vpython_version: 2.7
Bug: 1041020
Change-Id: I725a599dcd5dc8b2a18d49bad33b2dbdcfe7ac8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1994428
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
5 years ago
Jamie Madill 177710b35f Revert "git-cl: Fix format --dry-run not working with --full."
This reverts commit fc132e61db.

Reason for revert: Causes all presubmit checks to return dirty
format because of a non-zero diff output.

Original change's description:
> git-cl: Fix format --dry-run not working with --full.
> 
> The --full option would skip setting the return value of the format
> command when used with --dry-run. This in turn would cause the
> presubmit check to always pass when --full was enabled in a repo by
> default.
> 
> Was discovered in the ANGLE repository.
> 
> Bug: angleproject:4241
> Change-Id: Ie6cb423a6818c1e26781d77938a0dd22c02b4c16
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1987835
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Auto-Submit: Jamie Madill <jmadill@chromium.org>

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

Change-Id: I0a4c51117ab20606f6dbb1f7a3ba40f87da1e939
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:4241
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1993907
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
5 years ago