Commit Graph

503 Commits (1c9c003404cd5b286a33c480b0c3af9297537c3b)

Author SHA1 Message Date
Edward Lesmes 53014653d8 gclient: Give priority to URL over paths when specifying revisions.
e.g. when specifying both '--revision src@<something>' and
'--revision <src_gerrit_repo>@<some_gerrit_ref>', gclient will sync to
'<some_gerrit_ref>' instead of '<something>'.

This is useful when specifying which gerrit change to patch, which
should take priority over other revision specifications.

Bug: chromium:643346
Change-Id: Ibc21ede355b56e4da966f38f144ce6f6f1743403
Reviewed-on: https://chromium-review.googlesource.com/949981
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Edward Lesmes c29602466d gclient revinfo: Add an option to output a JSON file.
Add a --output-json flag to gclient revinfo so is easier for other
programs to process its output.

Bug: None
Change-Id: Ic120e7a279f3ed537ead624ab9bfd1f141485487
Reviewed-on: https://chromium-review.googlesource.com/952206
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Edward Lesmes daa76d2f22 gclient revinfo: Add options to filter by path or url.
Add --path and --url options to show only the dependencies that match
one of the given paths or URLs.

Bug: None
Change-Id: I12c205545b7ce54b56abcd62f9bf1db229b4fd77
Reviewed-on: https://chromium-review.googlesource.com/951963
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Shenghua Zhang 6f83031f3d [cipd] Support cipd dependencies hooked under same directory
When hooks multiple cipd packages under same directory, gclient would
pop up error that same directory name appears multiple times in deps
section. This CL overrides verify_validity for CipdDependency to
support multiple packages hooked in same directory.

Bug:812386
Change-Id: Ia4f1fe0e3c8481c9b06c1d22b6e98d98e1e4c309
Reviewed-on: https://chromium-review.googlesource.com/920686
Commit-Queue: Shenghua Zhang <shenghuazhang@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Shenghua Zhang f438ff743a [cipd] Match version to vars value supporting in gclient.py
For now 'version' of packages only support string like 'version:27.0.5'.
It is helpful to support version to match vars value, e.g.
Var('tool_version'), especially useful when version numbers could be
modified via api. This change won't affect versions with string format.

Change-Id: I40b389b528f04712798b08f1455869cab2ec54c9
Reviewed-on: https://chromium-review.googlesource.com/935666
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Shenghua Zhang <shenghuazhang@chromium.org>
7 years ago
John Budorick 64e33cba17 Fix gclient flattening of CIPD deps.
Bug: 813460
Change-Id: Ie52a20dcdf5cb60ab47b787dcfa05aa8a712a727
Reviewed-on: https://chromium-review.googlesource.com/926709
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
7 years ago
Tom Anderson c31ae0b4a9 Add target_cpu builtin variable to gclient
This CL adds target_cpu and target_cpu_only variables.  The logic is:

* If target_cpu is defined in .gclient, use it.  Otherwise, initialize it as an
  empty list.
* If not target_cpu_only, add the host arch to the list too.

detect_host_arch.py is copied directly from the Chromium repo.

BUG=807986
R=dpranke

Change-Id: I27621cbc81ad6a844648525863b92ffdd3b1d03a
Reviewed-on: https://chromium-review.googlesource.com/902441
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
7 years ago
Michael Moss 42d02c27c1 Make flattened recursedeps inherit parent conditionals.
BUG=783607
R=agable@google.com, dpranke@google.com

Change-Id: I6989203a9e560930cc53254c566275a30d3bead3
Reviewed-on: https://chromium-review.googlesource.com/902168
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Michael Moss <mmoss@chromium.org>
7 years ago
Michael Moss ce9f17f55a Allow custom_vars to override vars in flattened output.
Flattening currently ignores custom_vars, but it looks like that was
just an attempt to avoid including all the runtime-calculated values
(e.g. the host OS) in the flattened output, and not because there's any
real issue with supporting explicit overrides.

This is useful for changing default values in the flattened buildspecs
(e.g. to enable internal checkouts by default).

R=dpranke@google.com, iannucci@google.com

Bug: 570091,807318
Change-Id: I6d743f33cf7e3e202d5e68d21657f74f0e4c001b
Reviewed-on: https://chromium-review.googlesource.com/895927
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Michael Moss <mmoss@chromium.org>
7 years ago
Edward Lemur 231f5eab45 Print git output when cloning a repo.
This will allow us to show the progress when cloning a new repo when running
commands like gclient sync.

R=agable@chromium.org

Bug: 722686
Change-Id: I268cba343ea4c3c024292c9341d5009aa112b184
Reviewed-on: https://chromium-review.googlesource.com/890524
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Benjamin Pastene 6fe29419be depot_tools: Add a checkout_chromeos conditional var to gclient.
This is necessary for https://chromium-review.googlesource.com/c/chromium/src/+/882196.

Bug: 776987
Change-Id: Iec0a960a7d80f3ddbc0252073e30abc5a243f06c
Reviewed-on: https://chromium-review.googlesource.com/882318
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Benjamin Pastene <bpastene@chromium.org>
7 years ago
John Budorick 0f7b2007a5 Add cipd support to gclient.
Bug: 789809
Change-Id: I9942eaa613d51edd77ee5195603932a103f5e3cd
Reviewed-on: https://chromium-review.googlesource.com/829953
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Andrii Shyshkalov 77ce4bdc7d gclient on bots: don't cleanup lock files.
bot_update & gclient on bots instruct git cache locks
to be ignored, so there is no need to clean them up.

R=hinoka@chromium.org

Change-Id: I81c52cfcd44a42d13b641847439ac92053a7bc98
Reviewed-on: https://chromium-review.googlesource.com/791652
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Nodir Turakulov 0ffcc877a6 [gclient hooks] add .bat to vpython on windows
Bug: 781430
Change-Id: Idcba016f78078aa9678b8a246e964b3dcb09a016
Reviewed-on: https://chromium-review.googlesource.com/762389
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
8 years ago
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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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