This reverts commit d9011c559b.
Reason for revert: Breaks ChromeOS staging builders: b/296139378
Original change's description:
> Set --git-dir for git commands that may be executed in bare gits.
>
> Bug:b/294415576
> Change-Id: I18ca8ebebf95e1c31e30aa1f5d62da3467df940f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4778199
> Auto-Submit: Joanna Wang <jojwang@chromium.org>
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Joanna Wang <jojwang@chromium.org>
Bug: b/294415576
Change-Id: Ie16f16a405fbdea4d925e03a0cfd1ac0260bb2d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4784102
Commit-Queue: Jack Neus <jackneus@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
A base branch can be passed into `git cl presubmit` as a positional
argument, but the output for `git cl presubmit --help` did not mention
it until this CL.
Change-Id: I05d75af4fd175585a5e7ae74f2f4bb73227127ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4778138
Commit-Queue: Michael Cui <mlcui@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
When `gclient setdep` has `--deps-file` arg provided, use its basedir to
run submodule commands. And fail gracefully when thsoe commands throw
exceptions.
Change-Id: I94192b20fb5c34729c75404a34762546f6117689
Bug: 1472449
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4775173
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Once we're done using DEPOT_TOOLS_DIR to bootstrap ourselves, remove
it from the env so it isn't passed to the python script which might
in turn run commands from other depot_tools trees. Like gclient and
running chromium/src/third_party/depot_tools/ programs.
Bug: 1470590
Change-Id: I3dee847e45896ee25f01054026805277fc373c37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4764126
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
The filepath already has cwd appended so the command doesn't need cwd.
Change-Id: I20c6fea27aee963e90cdb8a15cb087771dafa0fa
Bug: 1472143
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4771942
Commit-Queue: Scott Lee <ddoman@chromium.org>
Auto-Submit: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
To avoid having users deal with merge conflicts between unstaged
gitlinks modified before and after a git rebase-update we can just
not commit unstaged gitlinks in our freeze index.
This change results in whatever gitlinks are unstaged before
git rebase-update to be just rebased on top of whatever the latest
gitlinks are from remote.
Bug: 1472148
Change-Id: If7dcb82778a0bdd14c408f0a0287780a7bdc5358
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4771356
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gregory Nisbet <gregorynisbet@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Also add oneline status on gclient gitmodules.
R=jojwang@google.com
Change-Id: I05c9f856ce6fd1c3ebf1dc7da672d25196a4cb67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4771975
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Git fetches submodules sequentially by default, which slows down gclient
sync. Instead of relying on git to fetch submodules, we can just
continue to rely on gclient to do the right thing.
R=jojwang@google.com
Bug: 1471702
Change-Id: Id0b104e76f702752bd7fecc7edac9245624bbb90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4766998
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
R=sokcevic
Rationale: both of us are member of source team now and we will
need to review CLs from contributors during our oncall rotation
Change-Id: If7a5f3ece668df0ed799653707f7e8378e753f56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4766323
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
This ensures that for ninja+reclient builds we still start reproxy to allow `rewrapper clang ...` to run locally.
Also this fixes a preexisting bug where RBE_remote_disabled=1 did not apply to the ninja call when running on mac
Bug: b/295192141
Change-Id: I37c4ffdd5f30d423b84f6c469f5edfa88efe1344
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4659225
Auto-Submit: Ben Segall <bentekkie@google.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
The `--format` option for `git ls-tree` was introduced in git v2.36 and
hence gclient breaks for lower git versions.
Change-Id: I02750904aa78bb5fd5f3f57dc2ad42e355fa4a42
Bug: 1471241
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4765682
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Run it in a subshell to avoid forking+execing another shell.
Bug: 1469696
Change-Id: I173f18aa3bf2f181db261750f4e51422717886ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4753234
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
The ParseGitModules() uses `git submodule status` result to get the
commit hashes for the submodules. It assumes the command's result to not
have a `git describe` at the end of each line, and hence only works in
certain scenarios. This change fixes this by updating the parser.
Change-Id: I8f4e3fae6562dafd0e127255a8f26e7336a75683
Bug: 1471241
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4763348
Auto-Submit: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
This reverts commit e121d14b12.
Reason for revert: git for mac arm is widely available now so
this hack is no longer needed. See: b/228226478
Original change's description:
> [cipd] Detect Mac ARM running under Rosetta
>
> If a user has git for x64, `git cl` results in downloading x64 cipd
> packages. Other operations, such as gclient or git-cl will result in
> downloading arm64. This flip-flopping between architectures causes
> unexpected behavior:
> (1) slows down commands since packages are wiped and new ones are
> downloaded.
> (2) long running processes, such as goma may crash.
>
> This change adds additional check for all macs running on x86 to check
> if is running under Rosetta and sets ARCH=arm64 if true.
>
> R=bryner@google.com, masonf@chromium.org
>
> Bug: 1311733
> Change-Id: I65b127467d5c47d5bf07952d2ecdcb93630c7c87
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3573068
> Reviewed-by: Brian Ryner <bryner@google.com>
> Reviewed-by: Mason Freed <masonf@chromium.org>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Bug: 1311733
Bug: b/228226478
Change-Id: I3888769944d7fe200a0bff8cf0a1c04407d50bdf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4763444
Reviewed-by: Jonathan Nieder <jrn@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
autoninja is intended to mean "build this directory, don't bother me
with the details". As we transition to siso it is therefore appropriate
that it should take on the duty of deciding whether to invoke ninja or
siso.
By looking for a use_siso gn arg autoninja can easily do this.
This change relies on crrev.com/c/4753433 to add the use_siso gn arg.
This change also teaches autoninja to detect if a user switches
between siso and ninja without doing a gn clean inbetween.
Note that this change also teaches autoninja to invoke autosiso or
siso ninja based on whether use_remoteexec is true.
Bug: b/293657720
Change-Id: I3ad36a81857e75ffe6babc4f107b777e733a285b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4749722
Reviewed-by: Philipp Wollermann <philwo@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
`Developer builds with reclient are not yet supported` is misleading.
This CL updates the message to help users to resolve the issues.
Bug: b/294933473
Change-Id: Ibce2854e25b8994af58011f4e7661f467fe910e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4755000
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
Detect failure of scm.GIT.RefToRemoteRef and raise an error before
attempting to join its results as a string. This makes certain
repository errors diagnosable.
Fixed: 1470430
Change-Id: I19cd86d9ed088f5cd511e4c9d7dbe5844165c7cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4754237
Auto-Submit: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
On NOP or incremental builds the reproxy startup/shutdown times can be a
significant portion of the total build time and it is important to
acknowledge these times.
Bug: b/294443556
Change-Id: Ic63331683632c8f447858b498f53d254b56ffe89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4753472
Reviewed-by: Philipp Wollermann <philwo@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>