Commit Graph

489 Commits (92b8b99069f423153ed314254fbfb9363893049b)

Author SHA1 Message Date
David Benjamin 105e11e251 Fix help string typo.
Bug:
Change-Id: Id7509ae08bc09c6cb291f29b55c60d6d96e79121
Reviewed-on: https://chromium-review.googlesource.com/721359
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: David Benjamin <davidben@chromium.org>
7 years ago
Daniel Cheng 93c5d606cb Update progress before running the hook.
This will let progress show the name of the hook while it's running.

Change-Id: I14ef2a9b5fd2bc4d8d778f5402f78a5827ffbb08
Reviewed-on: https://chromium-review.googlesource.com/731469
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
7 years ago
Daniel Cheng a0c5f0850a Reland "gclient runhooks: now with less spammy progress notifications"
This is a reland of 5fd1defbcc
Original change's description:
> gclient runhooks: now with less spammy progress notifications
> 
> Bug: 772741
> Change-Id: I62ad64219ba27ee4ea26ceb603b1133dff4a2e04
> Reviewed-on: https://chromium-review.googlesource.com/727194
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Daniel Cheng <dcheng@chromium.org>

Bug: 772741
Change-Id: Idd6fcd46a8c97716d68ed0975940705a90540a4d
Reviewed-on: https://chromium-review.googlesource.com/728961
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
7 years ago
Daniel Cheng a21b5b314b Revert "gclient runhooks: now with less spammy progress notifications"
This reverts commit 5fd1defbcc.

Reason for revert: breaks v8 because hook names are optional

Original change's description:
> gclient runhooks: now with less spammy progress notifications
> 
> Bug: 772741
> Change-Id: I62ad64219ba27ee4ea26ceb603b1133dff4a2e04
> Reviewed-on: https://chromium-review.googlesource.com/727194
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Daniel Cheng <dcheng@chromium.org>

TBR=dcheng@chromium.org,thakis@chromium.org,dpranke@chromium.org

Change-Id: I7dee0ca188f5ca34232f16e6496249fc9f49fa96
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 772741
Reviewed-on: https://chromium-review.googlesource.com/728959
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
7 years ago
Daniel Cheng 5fd1defbcc gclient runhooks: now with less spammy progress notifications
Bug: 772741
Change-Id: I62ad64219ba27ee4ea26ceb603b1133dff4a2e04
Reviewed-on: https://chromium-review.googlesource.com/727194
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
7 years ago
Marc-Antoine Ruel e6e0641b15 gclient: print an error message instead of crashing
When 'gclient recurse' is called from a unconfigured directory.
No functional change otherwise.

R=agable@chromium.org
Bug:774749
Change-Id: Ifb2b74c042ce31faf3e1287c5614739e58e9178c
Reviewed-on: https://chromium-review.googlesource.com/726419
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
7 years ago
Dirk Pranke 9f20d02085 Do not write gclient_gn_args_file too early.
Previously, gclient would attempt to write an args file after
a dependency was checked out, but before any sub-dependencies
had been checked out. If the args file path pointed at something
inside a sub-dependency, this wouldn't work, because the directory
might not yet exist. This most obviously happened for buildspec
clobber builds.

The fix is to wait until after the sub-dependencies have been
checked out to write the file.

R=phajdan.jr@chromium.org, mmoss@chromium.org
BUG=773933

Change-Id: I0cf4564204f7dabd9f843dc7904db7050fcc0d23
Reviewed-on: https://chromium-review.googlesource.com/714644
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
7 years ago
Michael Achenbach b3ce73d028 More verbose output when .gclient file cannot be found
Bug: 773769
Change-Id: I3c1a394c5995e0c56046da5f2509e63060aa6a29
Reviewed-on: https://chromium-review.googlesource.com/712935
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
7 years ago
Vadim Shtayura 08049e2db2 Revert "git_cache: Remove locks"
This reverts commit c3eb3fa335.

Reason for revert: lots of "runhooks" failure everywhere

Example: https://build.chromium.org/p/chromium.linux/builders/Linux%20Builder/builds/92720

Original change's description:
> git_cache: Remove locks
> 
> These aren't in use, and the original problem they were
> meant to solve has been solved at the gclient.py layer 
> using resource locking:
>   https://codereview.chromium.org/2049583003
> 
> Bug: 773008
> Change-Id: I6609f39d7f15604e0bb3d742a41c4f9fec87a57a
> Reviewed-on: https://chromium-review.googlesource.com/707728
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Ryan Tseng <hinoka@chromium.org>

TBR=iannucci@chromium.org,hinoka@chromium.org,agable@chromium.org,phajdan.jr@chromium.org

Change-Id: I31d5fef94f39f3a9f97b9e59121073b1f433d11e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 773008
Reviewed-on: https://chromium-review.googlesource.com/711054
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
8 years ago
Ryan Tseng c3eb3fa335 git_cache: Remove locks
These aren't in use, and the original problem they were
meant to solve has been solved at the gclient.py layer 
using resource locking:
  https://codereview.chromium.org/2049583003

Bug: 773008
Change-Id: I6609f39d7f15604e0bb3d742a41c4f9fec87a57a
Reviewed-on: https://chromium-review.googlesource.com/707728
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
8 years ago
Paweł Hajdan, Jr 3ba2a7cf38 gclient config: add support for custom vars
Bug: 570091
Change-Id: I44da3366fe4aa91240f4b3076f53e27aa4a81806
Reviewed-on: https://chromium-review.googlesource.com/700498
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr d325eb3496 gclient: make predefined variables native
See https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/687496

Bug: 570091
Change-Id: Ifb2c8473e1b1e8ae0c73365bc806a995ddbd7b74
Reviewed-on: https://chromium-review.googlesource.com/698066
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 78ce24e389 gclient flatten: properly quote conditionals
Bug: 661382
Change-Id: Id50b2541132002452bc5d86bb013758e8be0f4b0
Reviewed-on: https://chromium-review.googlesource.com/697813
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr e0214743cb gclient: add support for native boolean variables
Bug: 570091
Change-Id: I195f5f798d9869f385437db4e0bc5f4c5d4853ae
Reviewed-on: https://chromium-review.googlesource.com/687496
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Paweł Hajdan, Jr ecf53fecd6 gclient flatten: emit conditions for hooks
Bug: 661382
Change-Id: I0e74273a5e00b4f3cf1d5c22ce0944dc2fa6f31e
Reviewed-on: https://chromium-review.googlesource.com/692934
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr b495bf5017 gclient: evaluate variables before passing them to GN
This helps make sure they have proper types (e.g. True
instead of "True" for booleans).

Also see https://chromium-review.googlesource.com/c/chromium/src/+/681854
for context.

Bug: 756688, 570091
Change-Id: I1e4d26df724e8e94cc3daba361191856f80a1b2c
Reviewed-on: https://chromium-review.googlesource.com/681705
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr df64ee138a gclient: expose target_os
Bug: 570091
Change-Id: I7513f3360662975ef6ef1d9019726dcef730a586
Reviewed-on: https://chromium-review.googlesource.com/681700
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Paweł Hajdan, Jr feb01640a9 gclient flatten: improve reporting of DEPS files
- provide structured output
- take deps_file fallback into account

Bug: 756474
Change-Id: Icb15eb9601b0aaf510300cf8992b067a25f6888a
Reviewed-on: https://chromium-review.googlesource.com/663258
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Jaideep Bajwa d05f3580c4 gclient: Add aix to host_os list
R=mmoss@chromium.org, dpranke@chromium.org, phajdan.jr@chromium.org

Bug:
Change-Id: I0bfe0c38f3b1bfa5c8bd40747a0c3483d823cbdc
Reviewed-on: https://chromium-review.googlesource.com/660722
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
8 years ago
Paweł Hajdan, Jr a3b67ae2a7 gclient: predefine host_os
Bug: 570091
Change-Id: Ib2606fcc7251221ae10a0ef18b6585841d18eef4
Reviewed-on: https://chromium-review.googlesource.com/641750
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Paweł Hajdan, Jr 0870df2817 gclient flatten: only print DEPS info referenced by recursedeps
Bug: 756474, 570091
Change-Id: I8777b611f2b77b71cf75ec64ec1f0afca2104235
Reviewed-on: https://chromium-review.googlesource.com/629082
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 76a9d04a66 gclient flatten: include info about DEPS files: repos and paths
This CL includes this as comments in flattened DEPS, as requested
on the bug. For automated processes using this, we should export
the data in machine-readable form outside of the DEPS file.

Bug: 756474, 570091
Change-Id: I78cd2105113f41d599e293e772e1f1ca42679f3c
Reviewed-on: https://chromium-review.googlesource.com/621726
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr adae2a62f7 gclient flatten: correctness fixes for OS-specific recursedeps
We need to pass OS info to recursively called _flatten_dep.
Regular deps entries in OS-specific DEPS file recursed into
need to be marked as OS-specific in the flattened file.

Bug: 570091
Change-Id: If3055b84143d8a52d10d8753113893b5054b4d07
Reviewed-on: https://chromium-review.googlesource.com/621046
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Michael Moss c54fa81235 Include "ios" as a known "deps_os" value.
This fixes an issue where "--deps=all" syncs everything but ios.

R=dpranke@chromium.org, phajdan.jr@chromium.org

Change-Id: I413269c5026b2c04f0d34d9ca874057eb35e1076
Reviewed-on: https://chromium-review.googlesource.com/618802
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Michael Moss <mmoss@chromium.org>
8 years ago
Paweł Hajdan, Jr c69b32e1ea gclient flatten: parse DEPS file for deps_os recursedeps
Bug: 570091
Change-Id: I773b74b042233efa2a525f5f47e920468b7fea4a
Reviewed-on: https://chromium-review.googlesource.com/618930
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 5ec7713bed gclient flatten: fixes for --pin-all-deps
Consistently pin all dependencies - including deps_os and ones
with shortened shas.

We add --process-all-deps switch so that users can easily
tell gclient to check out all affected dependencies locally.

Bug: 570091
Change-Id: If68db98000c569ae35dd7d0a4b695eb80a589213
Reviewed-on: https://chromium-review.googlesource.com/617224
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Aleksandr Derbenev 9e8fb0e5d7 Add --cache-dir argument to gclient.
There are some usecases where it is simpler to pass path to the 
cache by an environment variable or command-line argument 
than to modify the gclient config file.

With this change:

 * GCLIENT_CACHE_DIR environment variable overrides cache_dir variable
   from .gclient file.

 * --cache-dir argument moved from gclient config to all gclient
   commands and overrides values from .gclient file and environment
   variable.

R=dpranke@chromium.org

Bug:
Change-Id: Iae107f1d5f02a2eee1896d0d3108dc20a83d597f
Reviewed-on: https://chromium-review.googlesource.com/596089
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Daniel Jacques <dnj@chromium.org>
Commit-Queue: Aleksandr Derbenev <alex-ac@yandex-team.ru>
8 years ago
Paweł Hajdan, Jr 39300ba2a0 gclient flatten: do not double-pin entries using a non-sha revision
For example:

  # buildspec -> tools_internal_DEPS -> build/third_party/python-rsa
  "build/third_party/python-rsa": {
    "url": "{git_url}/external/github.com/sybrenstuvel/python-rsa.git@version-3.1.4",
  },

Bug: 570091
Change-Id: I5fd444908c06fbd03bdaf0715401c1dbd9fbe89f
Reviewed-on: https://chromium-review.googlesource.com/611988
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 9a289023b5 gclient flatten: do not emit deps entries without a url
Otherwise it'd get stringified to "None" and make resulting DEPS invalid.

In theory we could properly serialize them to None,
but it's simpler to just skip them, since they do not affect resulting checkout.

Bug: 570091
Change-Id: Ica301e2d7e40ba4ed04527355d8f75a43456391c
Reviewed-on: https://chromium-review.googlesource.com/610150
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 05bcb89b7e gclient flatten: preserve vars in pinned deps
Bug: 570091
Change-Id: I8c450da68fd36d166f8f838c645672fce7c03891
Reviewed-on: https://chromium-review.googlesource.com/610004
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr de86ab35fb gclient flatten: also preserve variables in deps_os entries
This is the same change as in https://chromium-review.googlesource.com/c/586594
applied to _DepsOsToLines.

Bug: 570091
Change-Id: I06a4dc3a9b6dbb001a15b1d7b88fef12cf6c6aaa
Reviewed-on: https://chromium-review.googlesource.com/609980
Reviewed-by: Emma Söderberg <emso@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 11eb715369 gclient flatten: do not add deps_os entries to deps, even with recursedeps
Bug: 570091
Change-Id: I8e67d617c2738459634aabbffd22135ee5d27cc4
Reviewed-on: https://chromium-review.googlesource.com/609065
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr e2deb1efa2 gclient flatten: do not recurse into deps that should not be recursed
This finally makes the code structure seem right as well: there's just
one method (_flatten_dep), with a simpler control flow.

Also added a regression test.

Bug: 570091
Change-Id: I22ac7a3af0429a7ffd874b4b1715c0f6c72e0006
Reviewed-on: https://chromium-review.googlesource.com/608241
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr b0ad16ee41 gclient flatten: do not recurse into deps not in recursedeps
Nice side-effect of this change is simplifying the code.

Also added regression test coverage.

Bug: 570091
Change-Id: I470e9efc319632f997b02d210483988c17a7d3c8
Reviewed-on: https://chromium-review.googlesource.com/600369
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr c9353605bf gclient flatten: fixes for chromium/src
- allow variables with same names as long as values are also the same

- allow recursedeps entries referencing deps_os entries

Bug: 570091
Change-Id: I4abbd255982368a0ee33e8f3de631f3d18adf6ab
Reviewed-on: https://chromium-review.googlesource.com/583649
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 1407d00d0b gclient: make variables from parent DEPS scope override ones in inner scope
This is part of preparation for gclient flatten, conditions,
and improving internal gclient workflows.

This also ensures variables have consistent values in the entire checkout,
unlike the current situation where different DEPS files can use different
values for the same variable.

We override instead of erroring out, since otherwise commonly used dependencies
such as buildtools wuld have to be rolled simultaneously in unrelated projects,
say v8 and native_client.

Another reason for overriding are possible future use cases such as is_chromium_build,
which could be set to false e.g. in v8, but chromium DEPS would override it to true.

Bug: 570091
Change-Id: If61322dd9a55e57729a4100d05ecb9c1e3ae8e38
Reviewed-on: https://chromium-review.googlesource.com/596310
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr fc6196b306 gclient flatten: preserve variable placeholders (reland #1)
This is an exact reland of https://chromium-review.googlesource.com/583617 .

One of the main use cases is making it clear which revision hashes
need to be changed together. The way it's usually done is one variable
referenced several times. With this CL, we preserve the references
from original DEPS, as opposed to evaluating them and losing some info.

This CL actually makes Var() emit a variable placeholder
instead of its value, and adds support for these placeholders
to gclient.

One of possible next steps might be to deprecate Var().

Bug: 570091, 748486
Change-Id: Id47e3771b7163149a4cd427b84f84ece52772f34
Reviewed-on: https://chromium-review.googlesource.com/586594
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan Jr. 393ba066ef Revert "gclient flatten: preserve variable placeholders"
This reverts commit e79ddeaabf.

Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=748486

Original change's description:
> gclient flatten: preserve variable placeholders
> 
> One of the main use cases is making it clear which revision hashes
> need to be changed together. The way it's usually done is one variable
> referenced several times. With this CL, we preserve the references
> from original DEPS, as opposed to evaluating them and losing some info.
> 
> This CL actually makes Var() emit a variable placeholder
> instead of its value, and adds support for these placeholders
> to gclient.
> 
> One of possible next steps might be to deprecate Var().
> 
> Bug: 570091
> Change-Id: I9b13a691b5203cc284c33a59438720e31c9ebf7a
> Reviewed-on: https://chromium-review.googlesource.com/583617
> Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>

TBR=phajdan.jr@chromium.org,dpranke@chromium.org

Change-Id: If9c52ebfa78aba8041ce797ff842d09952d0e2ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 570091, 748486
Reviewed-on: https://chromium-review.googlesource.com/584907
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr e79ddeaabf gclient flatten: preserve variable placeholders
One of the main use cases is making it clear which revision hashes
need to be changed together. The way it's usually done is one variable
referenced several times. With this CL, we preserve the references
from original DEPS, as opposed to evaluating them and losing some info.

This CL actually makes Var() emit a variable placeholder
instead of its value, and adds support for these placeholders
to gclient.

One of possible next steps might be to deprecate Var().

Bug: 570091
Change-Id: I9b13a691b5203cc284c33a59438720e31c9ebf7a
Reviewed-on: https://chromium-review.googlesource.com/583617
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Paweł Hajdan, Jr 357415cb11 gclient flatten: fix a bug with some recursedeps not being processed
Added a regression test. Simplified some logic - if we don't add os-specific
deps and hooks to |dependencies|, we don't need to keep separate original values.

Bug: 570091
Change-Id: I5bdd0b6a66df6b3a2b99d0ad9c6e54ee7114f09b
Reviewed-on: https://chromium-review.googlesource.com/581687
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
8 years ago
Paweł Hajdan, Jr 271a16809a gclient flatten: implement --pin-all-deps
Bug: 570091
Change-Id: Ibf7c6a73cab8bb777a7e4a8d958f085238c76450
Reviewed-on: https://chromium-review.googlesource.com/562138
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr fb02201796 gclient flatten: include vars
ChromeOS build depends on buildspec_platforms variable, see
https://bugs.chromium.org/p/chromium/issues/detail?id=703268 .

Bug: 570091
Change-Id: I9c964d332b45cf10f5cb79a82ea721bd4aba80d3
Reviewed-on: https://chromium-review.googlesource.com/561681
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr aaf93f486a gclient flatten: refactor flatten code to a class
Instead of passing around 6+ out-parameters, keep state inside the class.

No intended behavior change.

Bug: 570091
Change-Id: Ia15c1db2170680f0ec087b61f51af49e12fd7579
Reviewed-on: https://chromium-review.googlesource.com/561700
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Paweł Hajdan, Jr 807caf84e9 gclient flatten: remove --require-pinned-revisions
It turns out it most likely won't be needed. Instead, auto-pinning
deps is useful mode.

This removal helps simplify and restructure the flatten code.

Bug: 570091
Change-Id: Ia70221c88a37f210cf1338a36d79168d2cfe96f6
Reviewed-on: https://chromium-review.googlesource.com/561717
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr c6846aa200 gclient flatten: fix a bug with deps_os getting omitted for recursed deps
Bug: 570091
Change-Id: I4fac33ca683ff2011fa7307d5175592f3d9e258e
Reviewed-on: https://chromium-review.googlesource.com/560171
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 4baaa11c01 gclient: avoid adding potentially duplicate entries to work queue
The main goal is to provide a migration path, where we can add
conditional src-internal entry to src/DEPS, and have it still
work on checkouts where .gclient pulls src-internal, provided
the condition evaluates to False.

The migration path is then to remove the .gclient entry, and
at the same time flip the condition to True (e.g. by overriding
a variable).

Bug: 570091
Change-Id: I9b9850a644463ab0b1f368d65a5cd5f47cf7be97
Reviewed-on: https://chromium-review.googlesource.com/559150
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr d379025129 gclient: apply custom_vars when evaluating conditions
Bug: 570091
Change-Id: Ib8009ae9ac77e50a09e3e2714cec7c67537b47a2
Reviewed-on: https://chromium-review.googlesource.com/558970
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr e015878d80 gclient flatten: fix an issue with an deps_os entry getting added to deps
The previous code did not distinguish between None and [] value for orig_deps.

This could be triggered by not having any deps, but some entries in deps_os,
in which case these deps_os entries would get added by mistake to deps.

Bug: 570091
Change-Id: Id5b41e37ea717d5d00404694ad5bfce8df9da934
Reviewed-on: https://chromium-review.googlesource.com/558349
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 6014b56642 gclient flatten: also handle allowed_hosts
Bug: 570091
Change-Id: I96417d462efb3b0476ee17d42ac5f19d8c4f99c3
Reviewed-on: https://chromium-review.googlesource.com/558352
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 5b593358a9 gclient flatten: skip empty fields
Bug: 570091
Change-Id: Ib1a86289f8219ead789e19896c2a873b8d59c179
Reviewed-on: https://chromium-review.googlesource.com/556035
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago