Commit Graph

5036 Commits (5c62ed59d2a3901931d01b27388d7c0037178a8e)
 

Author SHA1 Message Date
Edward Lesmes 5c62ed59d2 owners: Add support for comments at the end of the line.
Bug: 789773
Change-Id: Ic6fff7e4eba5e86dc77cf2b8e213228ec394dccf
Reviewed-on: https://chromium-review.googlesource.com/1019612
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
7 years ago
Andrii Shyshkalov 98824231fc [git-cl] make more informative error message.
R=vadimsh@chromium.org

Change-Id: Ib0891581b7eb5cd49667e7ec07e73232cd4874cd
Reviewed-on: https://chromium-review.googlesource.com/1020067
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
John Budorick 161623779e presubmit: don't attempt to verify nonexistent vpython specs.
Bug: 834180
Change-Id: I431431e4fdf99c16c5fc3dbc7ed999b0c8da24bc
Reviewed-on: https://chromium-review.googlesource.com/1016690
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
7 years ago
John Budorick 9ccad5689c bot_update: Ensure create_manifest ignores repos with explicit None urls.
Bug: 830306
Change-Id: Id87a6f2053c7e3cd489647d1cbbc8a83f2e585db
Reviewed-on: https://chromium-review.googlesource.com/1003326
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
7 years ago
Bruce Dawson 85c7502590 Teach autoninja.py to support GOMA_DISABLED env var
When GOMA_DISABLED is set goma will use the local compiler. Autoninja
needs to understand this in order to avoid requesting too much
parallelism.

Change-Id: Ic124893dd583a401d0d9ad7fbd27ee9b6715fcfe
Reviewed-on: https://chromium-review.googlesource.com/1015402
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
7 years ago
Andrii Shyshkalov adc953f927 Remove tandrii@ from watching git cl changes.
TBR=ehmaldonado@chromium.org

Change-Id: I25569c255acd7cb39364354b55dcb55bba0a9dd3
Reviewed-on: https://chromium-review.googlesource.com/1013081
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Edward Lesmes 67b3faa8f2 git-cl: Add parallel option to git-cl land.
It is used by CMDland but it was not declared and is causing failures.

TBR=agable@chromium.org

Bug: 832566
Change-Id: Ia8ba5df458f9a39e415b7a9495dc338def0b16a5
Reviewed-on: https://chromium-review.googlesource.com/1013056
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
7 years ago
Michael Moss b8f33bef55 Poke depot_tools recipe roller for git-cl fixes.
TBR=agable@google.com

Change-Id: I680ab9441acffc91fae7500eb369e85d989f7443
Reviewed-on: https://chromium-review.googlesource.com/1012929
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Michael Moss <mmoss@chromium.org>
7 years ago
Olivier Robin 75ee7258f8 Fix call to RunHook in CMDLand
After https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/994241
RunHooks take a parallel parameter.
This call was not fixed in initial CL.

TBR=agable@chromium.org

Change-Id: Ic2a076afbd8ef61e3bb12473f43e1e7eab273825
Reviewed-on: https://chromium-review.googlesource.com/1011613
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lesmes 58330b0db4 roll-dep: Use gclient_eval.GetRevision to get current revision.
R=agable@chromium.org

Bug: 760633
Change-Id: Iebabb417b5b1bd5a987de2707e84a0329e1ebe66
Reviewed-on: https://chromium-review.googlesource.com/1000758
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Kimmo Kinnunen 54a81e45dd Add support for downloading Windows VS toolchain from a HTTP URL
Add support for downloading Windows VS toolchain from a HTTP URL.
This is useful for developers that do not have access to the
Chrome toolchain.

If the developer specifies DEPOT_TOOLS_WIN_TOOLCHAIN_HTTP_BASE_URL
environment variable, the toolchain will be downloaded from that
url.

Bug: 830569
Change-Id: I41d815a4460085c3b028f56f2e01adc68d8410fe
Reviewed-on: https://chromium-review.googlesource.com/1002892
Commit-Queue: Kimmo Kinnunen FI <kkinnunen@nvidia.com>
Reviewed-by: Scott Graham <scottmg@chromium.org>
7 years ago
Asanka Herath 53a115e67e Add a '--inject-current' option to 'git new-branch'
This option creates a new branch that sets itself as the upstream for
the current branch and adopts the current branch's upstream as its own.

What does it do?
----------------

Imagine we have the following set of branches (as `git map-branches -vv`
would show it):

  origin/master  00001111  [ ahead 1 ]
    foo          00002222  [ ahead 1 ]
      baz *      00003333  [ ahead 1 ]

'baz' is the current branch. If one were to issue the following command:

  $ git new-branch --inject-current bar

... then the branch layout will now look like this:

  origin/master  00001111  [ ahead 1 ]
    foo          00002222  [ ahead 1 ]
      bar *      00002222
        baz      00003333  [ ahead 1 ]

Why would you need this?
------------------------

When working on a single change or a sequence of changes organized into
dependent branches, this option lets you quickly create a new branch
with the correct upstreams so that you can peel off smaller cleanups and
potentially unrelated changes out of your main feature branch into
separate branches. These can then be uploaded as dependent CLs.

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

Change-Id: Id912f8e5c17e267fc52d74bdfac7bbcf87a50908
Reviewed-on: https://chromium-review.googlesource.com/987529
Commit-Queue: Asanka Herath <asanka@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Peter Mayo 3297f1a0ac Remove petermayo from OWNERS
I think the statute of limitations has run out on me.
I'm no longer on the infra list so OWNERS doesn't make much sense.

Change-Id: I3b3815d5f93980574c319d74438e0a3732a25680
Reviewed-on: https://chromium-review.googlesource.com/1011461
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Peter Mayo <petermayo@chromium.org>
7 years ago
Edward Lesmes 8e28279759 Reland "presubmit support: Run all tests in parallel."
Currently all tests in a PRESUBMIT.py file are run in parallel, but not
all tests across PRESUBMIT.py files.

This introduces a flag that will allow presubmit to run all tests across
PRESUBMIT files in parallel.

Bug: 819774
Change-Id: Idd3046cb3c85e9c28932a9789ba7b207a01d9f99
Reviewed-on: https://chromium-review.googlesource.com/994241
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lesmes 5d6cde3941 gclient: Don't parse DEPS files that we won't recurse into.
Bug: 830306
Change-Id: I419f16583dc2bf4bd2a66a41eb73fff4802686a8
Reviewed-on: https://chromium-review.googlesource.com/1011391
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
recipe-roller 7662307ed7 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/45938bc375fc0610b9c331b9089d6d42d2fe2d90 Add CIPD recipe module (phosek@google.com)


TBR=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: If81375858619c689fec326b1c45b8b41623569db
Reviewed-on: https://chromium-review.googlesource.com/1011364
Reviewed-by: Recipe Roller <recipe-roller@chromium.org>
Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
7 years ago
Corentin Wallez b1c21a5af2 presubmit_unittest.py: use LUCI for the optional GPU tests on Windows
BUG=chromium:815092

Change-Id: Iecbbdf41a00a637e07dfb137d7956f110138b5f6
Reviewed-on: https://chromium-review.googlesource.com/1008302
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
7 years ago
recipe-roller 7e9e2c82bd 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/c56929b29c60fcaba3ee5d89da10c5e35ef03884 [raw_io] Add UNC magic prefix on win32 to handle long paths. (iannucci@chromium.org)


TBR=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I8c4e8c997d534d4ba0298cadc90531c43b8ecabf
Reviewed-on: https://chromium-review.googlesource.com/1008543
Reviewed-by: Recipe Roller <recipe-roller@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
7 years ago
Eric Boren 5888d6f676 roll-dep: Run gclient.py rather than gclient
gclient calls into update_depot_tools, where gclient.py does not.

Change-Id: Idabf0fd613ee241460fbeb6b897a79b084bbc4e2
Reviewed-on: https://chromium-review.googlesource.com/1000786
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Eric Boren <borenet@chromium.org>
7 years ago
Michael Moss da55cdc03c Apply parent vars to recursedeps.
This fixes an issue where cumulative conditions would fail to evaluate
if the recursed DEP (or custom_var overrides) didn't happen to redeclare
all the variables used by the parent conditions.

TBR=dpranke@google.com, ehmaldonado@google.com

Bug: 825063
Change-Id: Icb53f04928f914dfacc2c3035d01be103d9f8247
Reviewed-on: https://chromium-review.googlesource.com/1000836
Commit-Queue: Michael Moss <mmoss@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
7 years ago
Edward Lesmes 3f277fc747 roll-dep: Add support for gclient root various levels above.
In some cases, gclient root is not the parent directory, it might be two
levels above.

This fixes it by asking gclient for the real root directory.

Bug: 760633
Change-Id: I82d754f1c53259a111a74628f784d1bc461c18ef
Reviewed-on: https://chromium-review.googlesource.com/999971
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lesmes 411041f9be gclient: Add a command to get revision/variable information.
Introduce a getdep command to get revision/version/variable value information
as a counterpart for gclient setdep.

It will be useful for autorollers.

Bug: 760633
Change-Id: Iabeae0e78c6fbdcb1a3a79cfb380ac2d83f256d5
Reviewed-on: https://chromium-review.googlesource.com/999171
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Simon Zünd 5e79d07891 Move path to depot to the front of PATH in the tutorial.
Adding it to the end caused issues since a cpplint.py version comes
preinstalled on the system at /usr/bin/cpplint.py, that is actually a symlink to
a bash script.
When the presubmit script is run, it uses python to run this bash script, causing it to fail.

Change-Id: Ib12cbdf20265c14e7252f30c268b5b4a9ce32193
Reviewed-on: https://chromium-review.googlesource.com/999595
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
7 years ago
Edward Lesmes 1118a2193b gclient_eval: Support unpinned dependencies in SetRevision.
If a dependency was unpinned, support adding a revision to it.

R=agable@chromium.org

Bug: 760633
Change-Id: Id2c9fe5174458acaea334726176b88558425ef5a
Reviewed-on: https://chromium-review.googlesource.com/998735
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lesmes 8d6265766b gclient_eval: Add more support when adding new variables.
Now we respect comments before the first variable.

Bug: 760633
Change-Id: Ibe60d719429c033415bfb1c99942c9d04601d967
Reviewed-on: https://chromium-review.googlesource.com/998683
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Edward Lesmes 0ecf6d6a15 gclient setdep: Command line interface nits.
'setdep' now shows as a command when typing 'gclient help'.
We now use parser errors to indicate invalid formatting of flags, and
raise an error when there are unused arguments.

R=agable@chromium.org

Bug: 760633
Change-Id: I37fa65ef0c2cff9de1234efcf22bcd888a5e9589
Reviewed-on: https://chromium-review.googlesource.com/998741
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Edward Lesmes dbd6476c4e presubmit_unittest: Remove redundant tests.
Bug: 829134
Change-Id: I3a29b67d96e04162425148a401dfb384efd5cef3
Reviewed-on: https://chromium-review.googlesource.com/998629
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Sergey Berezin 9d3a7a9e0b Roll mac_toolchain to 496a91484
Relevant change:
  496a91484 mac_toolchain: preserve u+w and mtime for Xcode

Bug: 797051
Change-Id: Iae5b34ff31e110ce827a1d94dcee86049c5d7bc4
TBR=iannucci@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/998624
Reviewed-by: Sergey Berezin <sergeyberezin@chromium.org>
Commit-Queue: Sergey Berezin <sergeyberezin@chromium.org>
7 years ago
Eric Boren 0eb3956e13 roll-dep: Fix behavior for relative DEPS
Change-Id: I7580c3b890d0c5a9e926e1354bd9e0a44ac20f31
Reviewed-on: https://chromium-review.googlesource.com/997972
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Eric Boren <borenet@chromium.org>
7 years ago
Vadim Shtayura 2a5f70cc06 Kick the recipe roller to pick up the revert.
This one: 1ad681eca2

TBR=iannucci@chromium.org, maruel@chromium.org

Change-Id: If08d49500b604928fd565262264598a4ae0c3a4c
Reviewed-on: https://chromium-review.googlesource.com/996643
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
7 years ago
Brian White 361822cb2d Convert CygWin paths to Windows native for CIPD.
Bug: 828981
Change-Id: Ibd4b31413bcdbbfe9bb1076334c892f1a30c768e
Reviewed-on: https://chromium-review.googlesource.com/996432
Commit-Queue: Brian White <bcwhite@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Edward Lesmes a1df57cdc6 roll-dep: Support dictionaries in deps revisions.
Adds support for when the URL of the dependency is inside a dictionary.

R=agable@chromium.org

Bug: 760633
Change-Id: Idfdff0bdf27f0e3031f0cd17de2864da54ce65ac
Reviewed-on: https://chromium-review.googlesource.com/994416
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lesmes 1ad681eca2 Revert "presubmit support: Run all tests in parallel."
This reverts commit c7d0b34084.

Reason for revert:

See https://logs.chromium.org/v/?s=infra%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8950238735438551408%2F%2B%2Fsteps%2Fpresubmit%2F0%2Fstdout
Two go bootstraps executing concurrently and breaking each other. govet and golint presubmit checks both try to bootstrap go at the same time. 


Original change's description:
> presubmit support: Run all tests in parallel.
> 
> Currently all tests in a PRESUBMIT.py file are run in parallel, but not
> all tests across PRESUBMIT.py files.
> 
> This introduces a pool common to all files so we can run all of them.
> 
> Bug: 819774
> Change-Id: Ic129af1bc9e6da568fa9fa71827193c6d8ab9af1
> Reviewed-on: https://chromium-review.googlesource.com/973691
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

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

Change-Id: Ia5b5ae5af8d6cf9bd72388f58ff0f032a4367e10
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 819774
Reviewed-on: https://chromium-review.googlesource.com/994032
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Aaron Gable adcf030f69 Continue the story
TBR=jchinlee

Bug: 828154
Change-Id: I677acea5d4e32455fd2846c3ad9d61e43786b8d4
Reviewed-on: https://chromium-review.googlesource.com/993452
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
7 years ago
Edward Lesmes c772cf7d8b roll_dep: Make roll_dep.py use gclient_eval instead of regexes.
Now we no longer care what revision was actually checked out in disk.

R=agable@chromium.org

Bug: 760633
Change-Id: If18081808a8b8be2d4be8dd8dcca9e084ee2b7ef
Reviewed-on: https://chromium-review.googlesource.com/990784
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Aaron Gable 668c1d8d1f Reland "Remove Rietveld support from presubmit"
Since no one can upload or land changes from Rietveld anymore,
PRESUBMIT and its support files no longer need to be able to
support it.

Bug: 770408
Change-Id: I4ca6391291e7b0755c78af453c3d006ad3666a17
Reviewed-on: https://chromium-review.googlesource.com/991053
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
7 years ago
Edward Lesmes c7d0b34084 presubmit support: Run all tests in parallel.
Currently all tests in a PRESUBMIT.py file are run in parallel, but not
all tests across PRESUBMIT.py files.

This introduces a pool common to all files so we can run all of them.

Bug: 819774
Change-Id: Ic129af1bc9e6da568fa9fa71827193c6d8ab9af1
Reviewed-on: https://chromium-review.googlesource.com/973691
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Aaron Gable a6bee0ad16 Kick recipe roller
TBR=tandrii

Bug: 828154
Change-Id: Ib720922da0907b3a650db1d6255cc91aea320832
Reviewed-on: https://chromium-review.googlesource.com/991161
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
7 years ago
Aaron Gable ecee74ca4e presubmit: don't die when skipping unknown checks
If someone doesn't want to run a check, and that check doesn't
exist... great! We won't be running that check anyway.

R=iannucci

Bug: 770408, 828154
Change-Id: I74478cac9988e21a1fadfb2c9d23dac1697aaa46
Reviewed-on: https://chromium-review.googlesource.com/991093
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Sean McCullough <seanmccullough@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
7 years ago
Benjamin Pastene 81b26429c8 depot_tools: Kick the recipe roller.
TBR=agable@chromium.org
Bug: 828154
No-Presubmit: true
No-Try: true
Change-Id: I9e7d2a11716ae013a8fd774cfca450c1667df192
Reviewed-on: https://chromium-review.googlesource.com/990936
Commit-Queue: Benjamin Pastene <bpastene@chromium.org>
Reviewed-by: Benjamin Pastene <bpastene@chromium.org>
7 years ago
Aaron Gable aa6ddc6017 Revert "Remove Rietveld support from presubmit"
This reverts commit f3eed0016e.

Reason for revert: Some PRESUBMIT checks still expect 
CheckRietveldTryJobExecution to exist.

Original change's description:
> Remove Rietveld support from presubmit
> 
> Since no one can upload or land changes from Rietveld anymore,
> PRESUBMIT and its support files no longer need to be able to
> support it.
> 
> R=​tandrii@chromium.org
> 
> Bug: 770408
> Change-Id: I749092b66fdca16d5cef77e8cefc905aa5375b50
> Reviewed-on: https://chromium-review.googlesource.com/693380
> Commit-Queue: Aaron Gable <agable@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

TBR=agable@chromium.org,tandrii@chromium.org

Change-Id: I72e29bd8a9739406f29190adbeb7eb7718ed21cd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 770408
Reviewed-on: https://chromium-review.googlesource.com/991012
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Edward Lesmes d69c5dd538 bot_update: Don't patch if gerrit_repo or gerrit_ref are empty/None.
We should apply the patch only when gerrit_repo and gerrit_ref are passed,
instead of using only the --apply-patch-on-gclient flag.

R=agable@chromium.org

Bug: 643346
Change-Id: I28547aed9daeefa2657a108e0bacbfd4fc9fa07e
Reviewed-on: https://chromium-review.googlesource.com/989667
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Aaron Gable 8678d32937 Disallow TBRs to OWNERS files
TBRs bypass owners checks, but are also semi-suspicious: a
contributor TBRing many changes in a row to submit code to
a directory they don't own would be seen, frowned upon, and
inquired into. However, a contributor could bypass this by
simply TBRing a single change to add themselves to an OWNERS
file, and then contributing as normal from there. This CL
removes that loophole.

This will not affect sheriffs who TBR reverts for two reasons:
first, it is rare that a chance touches both code and an
OWNERS file, and therefore it is rare that OWNERS changes
get reverted; second, quick reverts (the kind sheriffs do)
bypass PRESUBMIT entirely, and therefore also skip OWNERS
checks.

Bug: 688115
Change-Id: If2b5c9d058c62caf95389287e0bb706aef721baf
Reviewed-on: https://chromium-review.googlesource.com/982601
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
7 years ago
Aaron Gable fb28d48c74 git-cl-try: document auth_config for buildbucket
git_cl.py uses auth.py to authenticate to cr-buildbucket,
but when it does so, it caches the token under a key for the
current codereview host, not the buildbucket hostname.

This is confusing, but is the desired behavior, so that users
can use different credentials (e.g. chromium and google) when
communicating with buildbucket about CLs on different gerrit
hosts (e.g. chromium and chrome-internal).

To prevent other people from getting confused like I did,
add some documentation to this effect.

Change-Id: If16896d15423bbdecf9624393773ac01d0d16a66
Reviewed-on: https://chromium-review.googlesource.com/990674
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
7 years ago
Aaron Gable f3eed0016e Remove Rietveld support from presubmit
Since no one can upload or land changes from Rietveld anymore,
PRESUBMIT and its support files no longer need to be able to
support it.

R=tandrii@chromium.org

Bug: 770408
Change-Id: I749092b66fdca16d5cef77e8cefc905aa5375b50
Reviewed-on: https://chromium-review.googlesource.com/693380
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Ravi Mistry 31e7d56c28 Support setting Auto-Submit during "git cl upload"
Bug: chromium:631551
Change-Id: I1f0c397d13d601a8ecac8328b6d7bf3c117c8297
Reviewed-on: https://chromium-review.googlesource.com/986286
Commit-Queue: Ravi Mistry <rmistry@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Edward Lesmes 3d99381342 gclient setdep: Add support to create new variables.
If the variable doesn't already exist, gclient setdep will attempt to
create a new variable with the given name and value as the first variable
in the vars dict.

R=agable@chromium.org, mmoss@chromium.org

Bug: 760633
Change-Id: I2462e70c3695a730f87c58e56c639104efbfa54a
Reviewed-on: https://chromium-review.googlesource.com/989282
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Sergio Villar Senin 0d466d22d8 git cl believes I'm working inside GCE
Looks like the error codes issued by python's http library might vary
between versions/distros. The code tries to reach an URL which is only valid
inside GCE and in the event of getting an error it assumes the user is
a non-googler.

At least in this case, we're seeing:

  third_party.httplib2.socks.HTTPError: (404, 'No such domain')

Adding this exception type allows the function to work correctly.

Change-Id: I08d3656b25d9046f8b2fc0da2a2b7c7a698c1d92
Reviewed-on: https://chromium-review.googlesource.com/978212
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Edward Lesmes 8271d22542 gclient_scm: Don't try to update file_list if it's None.
file_list can be none if gclient runs with --nohooks.
Fix apply_patch_ref so that it doesn't try to update file_list when it is
None.

TBR=agable@chromium.org

Bug: 643346
Change-Id: If00547da004415edfe68196a44cbda753b4db017
Reviewed-on: https://chromium-review.googlesource.com/989279
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Michael Moss 012013ee59 Add tests and fixes for |None| url values in deps entries.
This is useful for processing purely "local" DEPS files, with a command-line like:
  gclient revinfo --output-json /tmp/out \
    --spec 'solutions=[{"name": ".", "deps_file": "myDEPS", "url": None}]'

This is specifically to fix the "revinfo --output-json" case, but it
also cleans up some errors in the 'flattening' test cases. Note that
None values already work when using 'revinfo' with stdout output, it's
just the json output that complains.

BUG=825063

Change-Id: If5f69ba51cb9d0aa0f2b48a2f9b4ed8706b4c738
Reviewed-on: https://chromium-review.googlesource.com/989022
Commit-Queue: Michael Moss <mmoss@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago