Commit Graph

43 Commits (a3b6fd06f9d70795dc18d4ce8c7d66f6bf5a9c04)

Author SHA1 Message Date
Anthony Polito 2ae039a065 Add support for multi argument ands and ors, and the same precedence with
left to right grouping

Bug: 905740
Change-Id: I6a0b971556ab66bec841004fbbe8760b9136f216
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1793775
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Anthony Polito <apolito@google.com>
6 years ago
Edward Lemur a877ee62b1 depot_tools: Run some tests on Python 3 on the bots.
Bug: 984182
Change-Id: I0b7f1e3e056548a27a416c9b4078e54c9e5d60d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1769400
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
6 years ago
Edward Lemur ba1b1f7ab6 gclient_eval: Make compatible with Python 3.
Bug: 984182
Change-Id: I9485614658efa0ea9d50ea666210af63c3b97adc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1716131
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Ben Pastene a541b28d4e Add 'X in tuple()' support to gclient conditionals.
This is purely so I can land:
https://chromium-review.googlesource.com/c/chromium/src/+/1625812
instead of:
https://chromium-review.googlesource.com/c/chromium/src/+/1625813

That is, the former is a slightly cleaner version of the latter. However,
it doesn't work w/o this patch.

Bug: 947531
Change-Id: If8e7f8080ba5f40408680b598fed511df89be8bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1626479
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
6 years ago
Edward Lemur a1e4d48a10 setdep: Add support for variables when setting CIPD vars.
Bug: 914712
Change-Id: I13db57af519bb254389bc6bd1f1f81ad1d497e42
Reviewed-on: https://chromium-review.googlesource.com/c/1377295
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
6 years ago
Edward Lemur 8f8a50d00a gclient: Make built-in vars available for expansion.
Make it possible to refer to built-in variables without having to declare
then in DEPS files.

Bug: None
Change-Id: I5403963052463befc074f29750de56cce13927ce
Reviewed-on: https://chromium-review.googlesource.com/c/1312234
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lemur 5cc2afd9b8 gclient_eval: Handle non-string variables.
Bug: 877902
Change-Id: I77a1f213318d1e09ae050c2ea0113b2976bd259e
Reviewed-on: https://chromium-review.googlesource.com/1191928
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lemur 32e3d1e37c Add a library for monitoring.
Change-Id: I64c3d143186be938042c12e2455bdb034d3bcba8
Reviewed-on: https://chromium-review.googlesource.com/1079639
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Edward Lemur a92b961190 gclient setdep: Add support for CIPD versions
gclient setdep used to assume that the version of a CIPD package was always
of the form 'version:<something>'.
However, the following are all valid:
  * SHA1 hashes that specify a single instance
  * tags (tagname:tagvalue)
  * References (e.g. 'latest') that are dynamically resolved by the CIPD server.

This change adds support for all of them:
  * GetCIPD simply returns whatever the 'version' entry is, without assuming
    it begins with 'version:'.
  * SetCIPD sets 'version' ta whatever it is passed, without prepending 'version:'
    at the beginning.

Bug: 858978
Change-Id: I53669c5df7fb51cde42e0af271139b5719a47622
Reviewed-on: https://chromium-review.googlesource.com/1120943
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lemur e05f18d477 Reland "Reland "Expand variables in gclient flattened output.""
This is a reland of ff62224443
should_process was set to None in the previous attempt, so CIPD dependencies were not processed.
This CL fixed that.

Original change's description:
> Reland "Expand variables in gclient flattened output."
>
> This is a reland of a32f98e652
>
> Original change's description:
> > Expand variables in gclient flattened output.
> >
> > Bug: 848990
> > Change-Id: I0ad7e4f965973edbc5a335bd30f9cbd7b04abff2
> > Reviewed-on: https://chromium-review.googlesource.com/1085996
> > Reviewed-by: Michael Moss <mmoss@chromium.org>
> > Reviewed-by: Aaron Gable <agable@chromium.org>
> > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
>
> Tbr: agable@chromium.org
> Bug: 848990
> Change-Id: I7843544b79b2ab7e2046c187d13ea3eb65fc1b7d
> Reviewed-on: https://chromium-review.googlesource.com/1085975
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

Bug: 848990
Change-Id: Ic804be1b84bf8402a741a4189b60372075dfb6f3
Reviewed-on: https://chromium-review.googlesource.com/1087368
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
John Budorick b990770386 Revert "Reland "Expand variables in gclient flattened output.""
This reverts commit ff62224443.

Reason for revert: spec revert for crbug.com/849374

Original change's description:
> Reland "Expand variables in gclient flattened output."
> 
> This is a reland of a32f98e652
> 
> Original change's description:
> > Expand variables in gclient flattened output.
> >
> > Bug: 848990
> > Change-Id: I0ad7e4f965973edbc5a335bd30f9cbd7b04abff2
> > Reviewed-on: https://chromium-review.googlesource.com/1085996
> > Reviewed-by: Michael Moss <mmoss@chromium.org>
> > Reviewed-by: Aaron Gable <agable@chromium.org>
> > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> 
> Tbr: agable@chromium.org
> Bug: 848990
> Change-Id: I7843544b79b2ab7e2046c187d13ea3eb65fc1b7d
> Reviewed-on: https://chromium-review.googlesource.com/1085975
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

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

Change-Id: I89ffb80893be72f60043e8a6e02f6c0fb6fe5cc1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 848990
Reviewed-on: https://chromium-review.googlesource.com/1086747
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
7 years ago
Edward Lemur ff62224443 Reland "Expand variables in gclient flattened output."
This is a reland of a32f98e652

Original change's description:
> Expand variables in gclient flattened output.
>
> Bug: 848990
> Change-Id: I0ad7e4f965973edbc5a335bd30f9cbd7b04abff2
> Reviewed-on: https://chromium-review.googlesource.com/1085996
> Reviewed-by: Michael Moss <mmoss@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

Tbr: agable@chromium.org
Bug: 848990
Change-Id: I7843544b79b2ab7e2046c187d13ea3eb65fc1b7d
Reviewed-on: https://chromium-review.googlesource.com/1085975
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lesmes 01cb51055e Revert "Expand variables in gclient flattened output."
This reverts commit a32f98e652.

Reason for revert:
Doesn't work when there are variables which definition includes other variables, e.g.:

'cros_download_vm': '"{cros_board}" == "amd64_generic"',

Original change's description:
> Expand variables in gclient flattened output.
> 
> Bug: 848990
> Change-Id: I0ad7e4f965973edbc5a335bd30f9cbd7b04abff2
> Reviewed-on: https://chromium-review.googlesource.com/1085996
> Reviewed-by: Michael Moss <mmoss@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

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

Change-Id: I7e81000e92aa352e45b420845bb1dcc8572f1962
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 848990
Reviewed-on: https://chromium-review.googlesource.com/1085974
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lemur a32f98e652 Expand variables in gclient flattened output.
Bug: 848990
Change-Id: I0ad7e4f965973edbc5a335bd30f9cbd7b04abff2
Reviewed-on: https://chromium-review.googlesource.com/1085996
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lemur 16f4bad914 gclient: Merge hook_os with hooks and deps_os with os.
This is done in gclient_eval, so we can remove all code
that deals with deps_os and hooks_os from gclient.

Bug: 839925
Change-Id: I491819207a712d62008ff010e313add87d22c937
Reviewed-on: https://chromium-review.googlesource.com/1058375
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@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
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 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
Edward Lesmes 62af4e40a8 gclient setdep: Add support for more use cases
Add support for more ways to express revisions in DEPS files, notably
"<origin-url>@<revision>" which is needed for src-internal.

Bug: 760633
Change-Id: I86724b9c077c6101a0c424d80460123d15533da8
Reviewed-on: https://chromium-review.googlesource.com/988493
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Edward Lesmes 6c24d37fe9 Reland "gclient eval: Expand vars while parsing DEPS files"
This is a reland of 88f9c40e0c

We no longer need the vars dict to be declared before vars can be used.
This was causing problems because gclient flatten printed vars after deps,
breaking the above assumption.

Original change's description:
> gclient eval: Expand vars while parsing DEPS files
>
> Introduce a Parse function that takes care of expanding vars while parsing
> the DEPS file.
>
> It wraps Exec and exec calls, and supports deferring the expansion until
> later, so gclient flatten gets access to the unexpanded version.
>
> Bug: 821199
> Change-Id: I943b021cc4474c9cda67b3816b841dd8ada3f5b2
> Reviewed-on: https://chromium-review.googlesource.com/973749
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>

Bug: 821199
Change-Id: I583df23558f91871e1a2aa2574c20d35e54635f6
Reviewed-on: https://chromium-review.googlesource.com/981086
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Egor Pasko 4732b3b1c4 Revert (Reland "gclient eval: Expand vars while parsing DEPS files")
This reverts commits:
  dbbf350a34 Fix trailing whitespace test.
  b4f1d4498c Fix actual pylint errors.
  0d9ecc925d Reland "gclient eval: Expand vars while parsing DEPS files"

Reason: http://crbug.com/825724 Clank Official Build Failure - 65.0.3325.193

TBR=agable@chromium.org

Bug: 825724
Change-Id: Icef2d0ccc8a13b782a8e3d6b474b1281820947b5
Reviewed-on: https://chromium-review.googlesource.com/980334
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Robert Iannucci dbbf350a34 Fix trailing whitespace test.
And write the test better to avoid overzealous editor plugins :)

TBR=eakuefner@chromium.org, nodir@chromium.org, vadimsh@chromium.org

Bug: 825290,825174
Change-Id: I0541d4d70bcb256c24cb659bae256fa0aacb6806
Reviewed-on: https://chromium-review.googlesource.com/979116
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
7 years ago
Robert Iannucci b4f1d4498c Fix actual pylint errors.
TBR=eakuefner@chromium.org, nodir@chromium.org, vadimsh@chromium.org

Bug: 825290,825174
Change-Id: Ide4f03b0f9100a2110bad9d510921b46b2d4e43a
Reviewed-on: https://chromium-review.googlesource.com/979112
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Edward Lesmes 0d9ecc925d Reland "gclient eval: Expand vars while parsing DEPS files"
This is a reland of 88f9c40e0c

Original change's description:
> gclient eval: Expand vars while parsing DEPS files
> 
> Introduce a Parse function that takes care of expanding vars while parsing
> the DEPS file.
> 
> It wraps Exec and exec calls, and supports deferring the expansion until
> later, so gclient flatten gets access to the unexpanded version.
> 
> Bug: 821199
> Change-Id: I943b021cc4474c9cda67b3816b841dd8ada3f5b2
> Reviewed-on: https://chromium-review.googlesource.com/973749
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>

Bug: 821199
Change-Id: Ic04af0cae59abc01a0382e2de3497a91cf7e62fd
Reviewed-on: https://chromium-review.googlesource.com/978561
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Benjamin Pastene 728244f70a Revert "gclient eval: Expand vars while parsing DEPS files"
This reverts commit 88f9c40e0c.

Reason for revert: suspected to be causing update scripts failures and prevent gce bots from connecting
https://build.chromium.org/deprecated/tryserver.chromium.win/builders/win7_chromium_rel_ng/builds/128479/steps/update_scripts/logs/stdio

Original change's description:
> gclient eval: Expand vars while parsing DEPS files
> 
> Introduce a Parse function that takes care of expanding vars while parsing
> the DEPS file.
> 
> It wraps Exec and exec calls, and supports deferring the expansion until
> later, so gclient flatten gets access to the unexpanded version.
> 
> Bug: 821199
> Change-Id: I943b021cc4474c9cda67b3816b841dd8ada3f5b2
> Reviewed-on: https://chromium-review.googlesource.com/973749
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>

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

Change-Id: Ib9b84c13ef9b56735fd8f714b74a6601c61715e5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 821199
Reviewed-on: https://chromium-review.googlesource.com/976721
Reviewed-by: Benjamin Pastene <bpastene@chromium.org>
Commit-Queue: Benjamin Pastene <bpastene@chromium.org>
7 years ago
Edward Lesmes 88f9c40e0c gclient eval: Expand vars while parsing DEPS files
Introduce a Parse function that takes care of expanding vars while parsing
the DEPS file.

It wraps Exec and exec calls, and supports deferring the expansion until
later, so gclient flatten gets access to the unexpanded version.

Bug: 821199
Change-Id: I943b021cc4474c9cda67b3816b841dd8ada3f5b2
Reviewed-on: https://chromium-review.googlesource.com/973749
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
7 years ago
Edward Lesmes 9f531298e1 gclient eval: Get rid of global_scope, local_scope and functions other than Var.
Since we only support Var, and Var only does one thing, we hard code that
into the parser. Then, we don't need global_scope.

local_scope hasn't been needed for a while.

Bug: 760633
Change-Id: I21b171a8b71e7dcaf8e29c780ca88b9f46f368e8
Reviewed-on: https://chromium-review.googlesource.com/972611
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lesmes 6f64a0522b Reland "gclient: Add commands to edit dependencies and variables in DEPS"
This is a reland of 7f4c905fc5

Original change's description:
> gclient: Add commands to edit dependencies and variables in DEPS
> 
> Adds 'gclient setvar' and 'gclient setdep' commands to edit variables
> and dependencies in a DEPS file.
> 
> Bug: 760633
> Change-Id: I6c0712cc079dbbbaee6541b7eda71f4b4813b77b
> Reviewed-on: https://chromium-review.googlesource.com/950405
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>

Bug: 760633
Change-Id: Ia46c74d02e5cc3b67517dfa248f597cb3d98ef3d
Reviewed-on: https://chromium-review.googlesource.com/969457
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Edward Lesmes 0b89935ad6 Revert "gclient: Add commands to edit dependencies and variables in DEPS"
This reverts commit 7f4c905fc5.

Reason for revert:
When running "gclient sync" on a V8 checkout, it says:

  File "/work/chrome/depot_tools/gclient.py", line 995, in run
   self.ParseDepsFile()
 File "/work/chrome/depot_tools/gclient.py", line 874, in ParseDepsFile
   self._postprocess_deps(deps, rel_prefix), use_relative_paths)
 File "/work/chrome/depot_tools/gclient.py", line 660, in _postprocess_deps
   dval['condition'], self.condition)
TypeError: '_NodeDict' object does not support item assignment

on the recursive descent into third_party/android_tools/DEPS. Any chance that's related to https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/950405 ?

Original change's description:
> gclient: Add commands to edit dependencies and variables in DEPS
> 
> Adds 'gclient setvar' and 'gclient setdep' commands to edit variables
> and dependencies in a DEPS file.
> 
> Bug: 760633
> Change-Id: I6c0712cc079dbbbaee6541b7eda71f4b4813b77b
> Reviewed-on: https://chromium-review.googlesource.com/950405
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>

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

Change-Id: If58f6b15d31b19fc53294f1e41d26b4e684a2cf9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 760633
Reviewed-on: https://chromium-review.googlesource.com/969165
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lesmes 7f4c905fc5 gclient: Add commands to edit dependencies and variables in DEPS
Adds 'gclient setvar' and 'gclient setdep' commands to edit variables
and dependencies in a DEPS file.

Bug: 760633
Change-Id: I6c0712cc079dbbbaee6541b7eda71f4b4813b77b
Reviewed-on: https://chromium-review.googlesource.com/950405
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Dirk Pranke 77b7687e48 gclient conditionals are supposed to allow '!=', but don't currently.
R=smut@chromium.org
TBR=phajdan.jr@chromium.org
BUG=570091

Change-Id: I9e0cce71105e9b819019d64c8857c2e86796a16f
Reviewed-on: https://chromium-review.googlesource.com/704224
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: smut <smut@google.com>
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 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 76c6ea28e5 gclient_eval: implement boolean expressions
Bug: 570091
Change-Id: I72326ee6ddd907a97b5c497a8b2cc7fb744cf422
Reviewed-on: https://chromium-review.googlesource.com/523142
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr c485d5a5d9 gclient: use new exec logic when validation is enabled
This way we can get e.g. ordered dict as needed for conditions.
Only the new logic does it, not the regular python exec logic.

Bug: 570091
Change-Id: Ia5554e5b018085b3b9bd876b7f28a9f8e54a7984
Reviewed-on: https://chromium-review.googlesource.com/522564
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 7cf96a4b4b gclient_eval: use ordered dict
This is a step towards implementing conditions.

Bug: 570091
Change-Id: I99467033082d96021854c23dcff3fc2b56f995b4
Reviewed-on: https://chromium-review.googlesource.com/517107
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 05fec0394f gclient: fix recursedeps tuple/list validation for chromeos
Bug: 727685, 570091
Change-Id: I97a99d15930c1662c0ecfacd3755af27b282f686
Reviewed-on: https://chromium-review.googlesource.com/517800
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Paul Hobbs <phobbs@google.com>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr b7e533360c gclient validate: schema fixes (patch #1)
- allow None in deps_os values (for chromeos buildspecs)
- allow string formatting (%) in expressions (for dart)
- allow empty lists/dicts (for build slaves)
- allow target_os (for internal android)

Bug: 570091, 722206, 725422
Change-Id: I7f3d822a1c4aac16fddd96ef2f9f365e05b2d0e8
Reviewed-on: https://chromium-review.googlesource.com/512724
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr beec006697 gclient validate: add schema checking
Bug: 570091
Change-Id: I1297f817f2e3d791c22b256de40f12c0c23dceb5
Reviewed-on: https://chromium-review.googlesource.com/500807
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Paweł Hajdan, Jr e2f9feecaf Add validate command to gclient
Inspired by https://chromium-review.googlesource.com/c/411515/ .

Bug: 570091
Change-Id: I7bf9653178c06125ae8be1dee021acfc187b2bdc
Reviewed-on: https://chromium-review.googlesource.com/497848
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago