Passing --lkgr tracks the local "lkgr" branch which may not exist.
"origin/lkgr" is a better default since that should exist for projects
that have a lkgr.
Bug: 366394191
Change-Id: I2a0ce1a4d8540ce2e3ca06ef892e288c9892cf0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5876340
Auto-Submit: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
This is needed to support rolling multiple packages at once when package
names don't match.
Change-Id: I20bb5edfee87bb3e089a2c25f597e4778e0fe60f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5867086
Reviewed-by: Stephanie Kim <kimstephanie@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
We need to use this to determine if an account exists to determine
what auth to use, so we have to be able to override the default auth
detection.
Bug: b/366261039
Change-Id: I814b47ac1518170846ff9a7e5dc210f26db3e985
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5869049
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
This CL adds `explicit_build_config_keys` to the metadata for the server
to distinguish between explicit and default configs.
This CL excludes the configs set in `//.gn` from the list, so that
the configs specified by users will be considered as explicit.
Bug: 364971744
Change-Id: I6a3d289d8ca6e054dac691051b53c92ad1ec23c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5853009
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
This provides the consistent config between runs. This only supports
linux at the moment, a windows support CL will follow up. Note the
current count down is stored to ensure we provide the banner a minimum
of 10 times and a uuid is stored which is collected in lieu of the
actual username
Bug: 326277821
Change-Id: I3817436ea213c755f490914023508a10cf3cef1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5855459
Reviewed-by: Terrence Reilly <treilly@google.com>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
Add the protos for the traces used to publish metrics to Clearcut and
the anonymization code/test that ensure we don't collect de-anonymized
paths.
Bug: 326277821
Change-Id: Ifae4d51f59db2219995a0a8d21785729f5eeb137
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5850298
Reviewed-by: Terrence Reilly <treilly@google.com>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
External developers may use RBE without RBE_instance set.
Autoninja should not fail in this case.
Change-Id: I2dbafded690246132bb0ff1cd080caa0b758b4f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5851434
Auto-Submit: Aleksei Khoroshilov <akhoroshilov@brave.com>
Commit-Queue: Aleksei Khoroshilov <akhoroshilov@brave.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Account check would become too slow.
We'll check RBE project to use instead.
On corp machine, our policy to use @google.com account
and rbe-chrome-untrusted to build chromium/chrome.
We don't allow rbe-chromium-untrusted with @chromium.org
on corp machine.
On non-corp machine, user couldn't use rbe-chrome-untrusted
because it's @google.com only, and corp security policy
doesn't allow @google.com account on non-corp machine.
Bug: b/364318216
Change-Id: I0f3a19e105b050aef6a62e1b25b45b1722382a34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5848450
Reviewed-by: Scott Lee <ddoman@chromium.org>
Reviewed-by: Michael Savigny <msavigny@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Philipp Wollermann <philwo@google.com>
The detector can be a pretty direct port from chromite. A lot of these
metrics aren't likely neccesary but will be good to have complete
trace protos rather than missings parts. This also creates the
presubmit and .vpython3 file necessary to run the unit tests
Bug: 326277821
Change-Id: I4dbeabbbced4715527201eca888948b07b6004ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5840599
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
Reviewed-by: Terrence Reilly <treilly@google.com>
Setting this to `dirty` is generally desirable. If the user has
explicitly set it to something else on their chromium checkout,
warn rather than silently overwriting.
Rev^2: https://crrev.com/c/5832742
Change-Id: I8392c7976af0a1f8754a630bd865830ba6698051
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5836831
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Helmut Januschka <helmut@januschka.com>
Check /refs/heads/ strictly as branch revision type. Any ref (e.g. /refs/changes/*) not a branch has no difference from a hash.
Bug:341208163
Change-Id: I23e8c577b099adb88917527f827da3b122997cb2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5835142
Commit-Queue: Chenlin Fan <fancl@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
This reverts commit acd68a9a5d.
Reason for revert: Doesn't get values for non scoped config.
Original change's description:
> Avoid silently overwriting diff.ignoreSubmodules config.
>
> Setting this to `dirty` is generally desirable. If the user has
> explicitly set it to something else on their chromium checkout,
> warn rather than silently overwriting.
>
> Bug: 362787698
> Change-Id: I56587d501aafc5de78c82bc46e29f926519d25fa
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5832742
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Helmut Januschka <helmut@januschka.com>
Bug: 362787698
Change-Id: I3e5d1e44e3707dda53dc398f83c43259868d343b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5842067
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Joey Scarr <jsca@google.com>
Owners-Override: Joey Scarr <jsca@google.com>
Commit-Queue: Dan Le Febvre <dlf@google.com>
Setting this to `dirty` is generally desirable. If the user has
explicitly set it to something else on their chromium checkout,
warn rather than silently overwriting.
Bug: 362787698
Change-Id: I56587d501aafc5de78c82bc46e29f926519d25fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5832742
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Helmut Januschka <helmut@januschka.com>
When it's offline or the internet connection is unstable,
build_telemetry.enabled() may fail, which end up with
blocking autoninja command.
Bug: 364611323
Change-Id: Ie0d26e7b950e29af1392e452a0cd7e986494cdcf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5842066
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Philipp Wollermann <philwo@google.com>
If `git cl cherry-pick` fails to cherry-pick a CL, it should print
out the commit it failed to cherry-pick. Right now, that commit
is missing from the "print_any_remaining_commits" output
since commits get popped from the dict regardless of whether or
not a CL is created.
Bug: 364375259
Change-Id: Iac61f50b8f8f226b9e70bc2d0fa235f39c27d91e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5829953
Auto-Submit: Gavin Mak <gavinmak@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Multiple people have complained that we should format files when changing class names. That seems better than not formatting moved/copied files (you can always format a file separately before moving it to workaround the issue of moving unformatted files and presubmit complaining).
This CL essentially reverts https://crrev.com/c/4904205, meaning we will again run clang-format on files that were copied/moved.
https://crrev.com/c/5199134 is probably the proper fix by only looking at lines that were actually changed, but does not yet work with non-C++ formatters.
Checked locally that previously we wouldn't format a moved file, and with this change we now do.
Bug: 737568
Change-Id: Ie12c802316d5e293f2946c532e1600c342caaf59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5840596
Commit-Queue: Arthur Eubanks <aeubanks@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
This basically brings the functionality of git hyper-blame to git blame
by default and is supported since git 2.23.
Bug: none
Change-Id: I2023669deac999ef31d0e094e79d7214168acb63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5838110
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
If a CL and its cherry pick share a change ID, Gerrit will link to each
other in the UI.
Bug: 364692466
Change-Id: I6740ddfd813124d5876b29b05c4b8f91822faa57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5838865
Auto-Submit: Gavin Mak <gavinmak@google.com>
Reviewed-by: Matt Jones <mdjones@google.com>
Commit-Queue: Matt Jones <mdjones@google.com>
This only lasts per process invocation, so we don't worry about cache
size (and it's a minor performance save).
Bug: b/350806563
Change-Id: Ie8e1aa2933c5582a3a2e2f75f04590f6bb432c4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5833280
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
In case you're getting funny thoughts, these requests would not attach
any cookies anyway because the domain doesn't match. It just allows
requests to properly fallback to OAuth path.
Bug: b/362741558
Change-Id: Iaf83ad640501ff45671dbc358e676cbeaf04d686
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5824222
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
"Better" means:
1. Retrying a failed gerrit_util.CherryPick only once instead
of 5 times for faster feedback since more retries don't help.
2. Gracefully handling GerritErrors raised by gerrit_util.CherryPick
This CL also fixes a minor bug where the "Remaining commit(s) to
cherry pick" message would always print even if there were no more
commits left.
Bug: 341792235
Change-Id: I1712a6b080b14396463f3bceeeac84772f1253b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5825626
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>