In https://crrev.com/c/6442501, apply_patch_ref() was updated to
refresh the git cache when applying patches in gclient. However,
it causes an excessive number of logs to be created, particularly
for src/v8, as the repo has a huge number of branches.
This CL simply sets the verbose option with False,
ignoring the value in options.verbose.
Bug: 407795715
Change-Id: Ibf32ff67d23f41b398cca82372c17d7ca331db26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6486489
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
The presubmit script could succeed with warnings. We do want to show
those warnings in the Gerrit CL as well.
Change-Id: Iab6e420261d8cfc8baad18b3b2b8b6f9718776a8
Bug: 404837554
Recipe-Manual-Change: build
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6486226
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
This option is already available for gclient revinfo. Adding it
to gclient sync means we get to reuse the filtering logic
already being used for revinfo.
Bug: 411662322
Change-Id: I6bd5e1cffe583247a497358ada1e0b82d0be986d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6481194
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Code findings will be uploaded to resultdb. If resultdb is not
enabled, exception will be thrown.
Bug: 404837554
Change-Id: I76ff82d6ecdd987fe08fdd703b67a1171d85eed0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6479007
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
The recipe will convert presubmit result to finding as long as it has
location data.
Change-Id: I8e0ce4cf5f66d6236f10c21a6db87d293b3fe379
Bug: 404837554
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6469944
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
This will help us to display preusbmit result as findings both in
Gerrit and in Cider workspaces.
Change-Id: I0f5a9c503c1b14dc8dcbf9794cc556ef215a46a2
Bug: 404837554
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6469939
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
As part of an effort to make split_cl.py less monolithic, this
collects the parts of SplitCl related to the CL description, and
puts them into a separate function.
Bug: 389069356
Change-Id: I2d01c09799182cd57bcdd60bb000b59e3bc71aa9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6470263
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
Refine the post-mirror-update check in `_UpdateMirrorIfNotContains` to
verify only when the hash revision is a SHA-1 hash. This fixes a
regression where syncing refs under refs/changes/* fails because the
check was incorrectly applied to non-hash revision strings.
Bug: 407864212, 341208163
Change-Id: I07dfe29fa7f27f6c69fa281762779e305e83b91f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6469936
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
As part of an effort to make split_cl.py more monolithic, this
separates out the code which summarizes the splitting, prompts
the user to edit it, and validates it afterwards.
This also fixes a bug where interactively-edited files bypassed branch validation.
Bug: 389069356
Change-Id: I498596a5ed624190fb355951049252c8b1d615fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6469475
Commit-Queue: Devon Loehr <dloehr@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
As part of an effort to make split_cl.py less monolithic, this
separates out the part of SplitCl which gathers basic information
about the git repository.
Bug: 389069356
Change-Id: Ib005e352aa024dab8ff69417865d2d766732af0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6471062
Commit-Queue: Devon Loehr <dloehr@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
As part of a cleanup effort to make this script's major functions
less monolithic, this moves the part of SplitCL responsible for
computing a splitting into its own function.
Bug: 389069356
Change-Id: I1f8571d7bf27018da6c25263a05ad098e7d05836
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6469473
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
I believe Git will try to run the file without extension (this bash
file) directly, which causes issues.
Bug: 410753790
Change-Id: I3a43dfd84e6459f64a023d3c656d8d3ff3b7bd5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6463456
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Make it consistent with the other line that uses "yet"
Change-Id: I6cae354b61ac673bb4d93a878daf01cebbf67a0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6459922
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Most users who access this have SSO, but there are some people with,
e.g., read access without SSO.
So we may as well configure this always I guess, even if it's
nonfunctional for many people since they have no permission to any
repos on chrome-internal.
Change-Id: Ia560a64e7771f1438fb1527389a310bbbe951477
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6456192
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
We're switching the GN arg to be default-enabled for local builds.
Bug: 404503040
Change-Id: I710b8fa38bf4ce97d592861b28a49b0bc867b702
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6454372
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Some users just run creds-check which doesn't fix submodules.
Bug: 408501013
Change-Id: Iddb19e922aff8cb265638588595403ac193ead52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6449740
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Otherwise it creates a dependency cycle. This is needed if we want to
recurse into submodules. Maybe this should be refactored more, but
this should be an improvement for now.
Change-Id: I4641e9ce1952bba81f717acbeefd59dd687d87ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6448579
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
Both the internal and community maintained cpplint support regional
nolint annotation NOLINTBEGIN/NOLINTEND.
Bug: 409733462
Change-Id: If738e8f6b8b30e88adec74383fecd8198fe70fbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6446042
Auto-Submit: Tommy Chiang <ototot@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Tommy Chiang <ototot@google.com>
We're using copybara to sync upstream repo here automatically.
Grant it owners access so more devs can help merge its syncs.
Change-Id: I54acf18c73af6e8c8a670d2761ad60b2a778a20a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6419683
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
_UpdateMirrorIfNotContains populates the mirror if a given rev
isn't found in the mirror, but if this rev is invalid, it's never
fetched at all. Check that we've actually fetched it after
populating the mirror.
Bug: 407864212
Change-Id: Id66695636e749c4f7372aa522ab03ec4ec8feb52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6441962
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
cpplint is removed from Tricium in CL:6219798. Remove the reference to
it to avoid confusion.
Bug: 393394190
Change-Id: Id816bfef3af18a6d95b655b8e1155632595b1835
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6446043
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Tommy Chiang <ototot@google.com>
The config dumps a lot of text, so pause here. Probably improves UX a
bit.
Change-Id: I9890f9286abe28ecc3e6f05b6d0dde94c5bc9710
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6442237
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
The UX of cd'ing to a non-Gerrit repo to setup common repo auth is not
good. Also people don't read.
Bug: 408501013
Change-Id: Ia31914cf8672d0b5a6033de11c928140fd34a95c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6442235
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
People assume the tool has failed and keep trying to re-run it when it
says to run git credential-luci login.
Bug: 408501013
Change-Id: Id1f671bacfdc19d4614ff03cfa69bfd484ad741b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6441970
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
Dissuade users from removing their .gitcookies manually.
Just to create a single UX path and prevent possible issues.
Bug: 408225524
Change-Id: Ief48806dccf759ead8d145424c854561e09d43ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6440131
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>