Mimics bot_update's functionality to apply gerrit refs in gclient
via --gerrit-ref flags.
When the patch fails to apply, gclient sync will return exit code 2.
The idea is to move this logic from bot_update to gclient sync to
deal when patches for projects like ANGLE are tried on Chromium bots.
This way the patch is applied before recursively parsing and syncing
ANGLE’s DEPS.chromium file, which doesn't currently happen.
Bug: 643346
Change-Id: I7e2018b3c393a5ac9852b8c3611f906977eeeb18
Reviewed-on: https://chromium-review.googlesource.com/961605
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This reverts commit 33bf49538c.
Reason for revert: Done debugging.
Original change's description:
> Add debugging info when gclient deletes an old DEPS entry.
>
> To help figure out why it decided to do so.
>
> BUG=823586
>
> Change-Id: I93d7c9f7af6145ee0ebd9f5ad4483f27925e84d6
> Reviewed-on: https://chromium-review.googlesource.com/970082
> Commit-Queue: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
TBR=thestig@chromium.org,agable@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 823586
Change-Id: I476cbe423b849582f8684426653f0c08062e89e9
Reviewed-on: https://chromium-review.googlesource.com/974458
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
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>
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>
gclient previously used a CIPD root per DEPS file. This didn't work
in cases in which a DEPS file wanted to specify a CIPD package outside
of its directory hierarchy, though, as is the case with buildspecs.
Bug: 755920
Change-Id: I0d6c3db567f17f9171c0feaaf9ed6bc64db22757
Reviewed-on: https://chromium-review.googlesource.com/955933
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
To help figure out why it decided to do so.
BUG=823586
Change-Id: I93d7c9f7af6145ee0ebd9f5ad4483f27925e84d6
Reviewed-on: https://chromium-review.googlesource.com/970082
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
This helps make it slightly easier to understand.
Change-Id: Iaf68409374be67e03d5708b409c1ad9229c68b1d
Reviewed-on: https://chromium-review.googlesource.com/970161
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
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>
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>
This also adds support for V8 project on issue tracker.
R=tandrii@chromium.org
Change-Id: Ie90ae664573d36030267b639e8a55bc349cad872
Reviewed-on: https://chromium-review.googlesource.com/966623
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
This method hasn't been supported for a long time now (and besides, its
only for Rietveld).
R=agable@chromium.org, tandrii@chromium.org
Recipe-Manual-Change: infra
Change-Id: Ie6e63834dca67962db29f2cb407950ed85db55a7
Reviewed-on: https://chromium-review.googlesource.com/957832
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
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>
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>
This allows people to configure their gitcookies file to be
whereever they want. As long as it actually exists and has
credentials in it, we'll accept it, just like git itself.
Change-Id: I4aa4806ddca0e61b28b003b0d3bc486407c13ab4
Reviewed-on: https://chromium-review.googlesource.com/951917
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
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>
This allows the cipd client to process refs with slashes in them.
Also it is compiled with cgo on OSX, which should help with DNS
resolution errors that happen on some machines.
R=vadimsh@chromium.org
Bug: 811974, 803673
Change-Id: If298db5cfe0e10e3734deb4215bf82b95ff5e09e
Reviewed-on: https://chromium-review.googlesource.com/940521
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
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>
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>
Over last two weeks of running tryjobs on CLs of others, I found
this very useful. This CL also simplifies code.
R=agable@chromium.org
Change-Id: I5c7ce0d311b1ca024b92227dbec54e5197205c62
Reviewed-on: https://chromium-review.googlesource.com/930742
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
This will allow users on unsupported platforms to successfully bypass vpython
via the recognized environment variable.
R=tandrii@chromium.org, vadimsh@chromium.org
Change-Id: Id63019443321d9f63550fc11e7a4ae3f684b17e7
Reviewed-on: https://chromium-review.googlesource.com/927695
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Python multiprocessing is using sockets to communicate. UNIX socket names are
bound by PATH_MAX which includes temporary directory name.
gsutil uses multiprocessing, which creates file sockets in the tmpdir.
On some testing configurations, the tmpdir is set to a very long path, which
causes gsutil to fail with AF_UNIX path too long errors.
To prevent multiprocess failures, this CL overrides temporary directory
dictated by the environment to /tmp.
Bug: 812581
Change-Id: Idcd99d13b2e20b3095111fa26ec4e242848c8848
Reviewed-on: https://chromium-review.googlesource.com/923170
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Alexander Alekseev <alemate@chromium.org>
A handy usage pattern for autoninja.bat that I was not aware of is to go
autoninja -C out\Default chrome && chrome
This will build chrome and then run it, but only run it if the build
succeeds. The addition of post_build_ninja_summary.py broke this by
losing the error code. This change fixes it by using black magic to
set an error code in the failure case.
Bug: chromium:787983
Change-Id: Ib87fd1799816e19d56de76e08e0f9688be903d80
Reviewed-on: https://chromium-review.googlesource.com/916705
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
post_build_ninja_summary.py gives a summary of a ninja build. It can be
run standalone or it can be run automatically by autoninja. This CL
updates the Python script and the autoninja bash script to make this
work on Linux. This includes removing a zero-value assert, and ensuring
that .so files get categorized as such.
Change-Id: I2d59ab129f5ce70117beeb119719f8432bfbab7c
Reviewed-on: https://chromium-review.googlesource.com/915053
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
When someone runs "gclient diff", they expect to be diffing their
local state against the state of a clean gclient checkout.
Up until now, "gclient diff" has been doing... not that. It's been
assuming that the sha1 in DEPS is approximately the head of the
remote's master branch, finding the merge-base between the local
content and that remote master, and diffing against that merge-base.
This makes basically no sense in the context of gclient. With
gclient, we already know exactly what should be checked out: it's
whatever is in DEPS.
This CL updates the behavior of "gclient diff" to do the right thing.
Bug: 731701
Change-Id: I23a43cbc0d6bc7772495097ff615d4d070f5ad19
Reviewed-on: https://chromium-review.googlesource.com/914717
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
Previously, it counted the number of UTF-8 bytes when spacing out the
table, not the number of code points.
Bug: 808905
Change-Id: Ice5504089e0f7097e108c6dfbbb810620b9dfc94
Reviewed-on: https://chromium-review.googlesource.com/901142
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>