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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>