It turns out we are already parsing the full output of `git status`,
so we may as well use that. This output already ignores submodules.
This also updates the freeze implementation to avoid unnecessary
calls to `git commit` when we already know if they are needed or
not.
Note that `git stash` (which `git freeze` is emulating) already
ignores submodules as well.
Ignoring submodules while freezing should make `git rebase-update`
work again inside of repos which have dirty submodules.
R=gavinmak,jojwang
Change-Id: Ib3a7784b6e7e7c19687203c1f4c32422a49bf8e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4680288
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
This will improve the ergonomics of `git cl upload`, `git cl
description`, etc. for `vim` users.
I'm sure there are analogues for emacs, vscode, etc, but I'll leave
that as an exercise for a user of those editors :)
R=aravindvasudev@google.com
Change-Id: I194718326bc34092ef8c669a97eae9598592137d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4676559
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
The recipe engine has a refactor coming up where CONFIG_CTX needs to
be explicitly exported for other modules to extend it. Currently
a handful of modules in the build, build_internal and
release_scripts repos extend the gclient configuration context.
Exporting it like this should have no functional effect, but is just
in preparation for the upcoming refactor.
R=gavinmak
Bug: 1462728
Change-Id: I5871d472f7e28d38eefa9b1e89cfcc804823a1bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4680284
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
We expect gclient to place git submodules in the same directory where
.gitmodules is, and without any modification.
Prior to this patch, gclient reads paths and use them as-is. So, if a
project ./foo/ has submodule 'bar', the git repository will be placed in
./bar instead of ./foo/bar iff use_relative_paths is set to false.
Bug: 1429149
Change-Id: I4f99bb11a20d9779c1226926187ebfd8f5d829a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4680282
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
This fixes a bit of awkward UX where you create a new branch and
immediately want to reparent it.
Previously:
```
$ git new-branch something
$ # Oops, I really wanted that to be based on other_branch
$ git reparent-branch other_branch
Reparenting something to track remove_urllib3_hack (was origin/main)
Rebasing: something
Deleted branch something (was e10e74d5).
'something' was merged with its parent, checking out 'origin/main' instead.
```
R=gavinmak@google.com
Change-Id: I60cd4da4798094476d47ff684f301bbdee1293b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4680281
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Noticed while working on the infra repos.
Currently `git rebase-update` will do a `git freeze`, then run a
`git status` to make sure the tree is clean... however this status call
currently considers submodule state, which leads to a really confusing
experience. `git rebase-update` is trying to ensure that the FILES on
disk won't be goobered during the rebase process... a process which
essentially ignores submodule state entirely.
This CL just makes `git rebase-update` ignore submodule diffs.
R=aravindvasudev@google.com
Change-Id: I9d546ac9ef0c0ba6ac9918f08fb5163ab18aebb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4680280
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
This rolls adds support for xcode15 adoption, in case builders using osx recipes want to roll to xcode15 in the future
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Bug: 1457029
Change-Id: I958d1ac03281d5663ff3a0df4f0812bde863df2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4675569
Reviewed-by: Jeff Yoon <jeffyoon@google.com>
Commit-Queue: Yue She <yueshe@google.com>
This is a reland of commit e27d7c3816
Original change's description:
> Drop support for py2 presubmit hook win mapping
>
> We no longer support py2 so we shouldn't have a special handling for py2
> hooks.
>
> R=gavinmak@google.com
>
> Change-Id: I038f462a4991d17bedb3e02104374b3ad1ffa5ff
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4541664
> Commit-Queue: Gavin Mak <gavinmak@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Change-Id: I190fb7c1ee4e76adfe74196c1ed579a424314a02
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4669591
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
This CL adds the Shipped field (and may update the
License File field) in Chromium READMEs. Changes were
automatically created, so if you disagree with any of
them (e.g. a package is used only for testing purposes
and is not shipped), comment the suggested change and
why.
See the LSC doc at go/lsc-chrome-metadata.
Bug: b:285450740
Change-Id: Id4efb2646598d1dd6f12147a9651326021330d80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4664434
Commit-Queue: Anne Redulla <aredulla@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
This change adds `git_dependencies` flag to the DEPS. This will be used to track the submodule migration state.
Design Doc: go/depot-tools-on-submodules
Change-Id: I547ad8ebbce2535960d4b6e00c0b14c00118f544
Bug: 1429149
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4591777
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
This reverts commit ae21f6a5ec.
Reason for revert: crbug.com/1462502#c11
Original change's description:
> New vpython to depot_tools
>
> 1. virtualenv field in the spec is ignored.
> 2. --vpython-tool removed support for delete and help subcommands.
> 3. --vpython-tool installed removed support for naming venv.
> 4. removed support for -vpython-interpreter.
> 5. removed support for searching interpreters in host PATH.
> 6. python 2.7 is available only if the binary is invoked as `vpython`.
> 7. fixed a bug that passes invalid vpython arguments to the script,
> which may be silently ignored.
> 8. python_version in the vpython_spec must specify a minor version
> (python_version: "3" is not valid anymore).
> 9. vpython now requires the cipd binary to be present in PATH, which is
> true already when using Swarming or depot_tools.
>
> Also updates the LUCI_OWNERS to add peep-software-deploy team.
>
> Bug:1415212
> Change-Id: I295c1aad1516a0c36eefa2ae04e85cabb518bda8
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4653897
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Chenlin Fan <fancl@chromium.org>
Bug: 1415212
Change-Id: I3d00edf7d2a0d61d30b263362d35704d9f63a44d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4668482
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
We plan on introducing a TODOC marker in v8.
(This is similar to a TODO but as a note to document something.)
At the current state the linter complains on lines like:
// TODOC: [...]
claiming that the TODO misses a username.
We'd like our new marker not to require a username.
The new regex is a merge of the existing regex with the updated
regex in the google-internal source this script is based on.
Change-Id: Ib792c82a9d62e45ef7994beab3fb3f48d7241292
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4660911
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
1. virtualenv field in the spec is ignored.
2. --vpython-tool removed support for delete and help subcommands.
3. --vpython-tool installed removed support for naming venv.
4. removed support for -vpython-interpreter.
5. removed support for searching interpreters in host PATH.
6. python 2.7 is available only if the binary is invoked as `vpython`.
7. fixed a bug that passes invalid vpython arguments to the script,
which may be silently ignored.
8. python_version in the vpython_spec must specify a minor version
(python_version: "3" is not valid anymore).
9. vpython now requires the cipd binary to be present in PATH, which is
true already when using Swarming or depot_tools.
Also updates the LUCI_OWNERS to add peep-software-deploy team.
Bug:1415212
Change-Id: I295c1aad1516a0c36eefa2ae04e85cabb518bda8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4653897
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Chenlin Fan <fancl@chromium.org>
The usage of config in the git_cl module is wholly unnecessary - This
CL gives a trivial way to change downstream repos to use a normal method
in place of configs, which will ultimately let us remove config.py from
this module.
Change-Id: Ia02ad110c41fadcd3bada0258ba96cbe70d0e43c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4662591
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
The "upload traces" step is skipped if bot_update times out and is in
the grace_period. Reserve 1 minute to upload traces.
Bug: 1351547, 1456840
Change-Id: Idb191735a07d245575ff4c79375a976750522fa5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4651461
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Since python3.3, the platform value has been changed from linux2 or
linux3 to linux. The bug has stopped bot_update script from emitting
proces tree periodically that will be helpful when debugging.
R=sokcevic
Bug: 1455926
Change-Id: Id6ab4ddf46eaa322a8b5470baa7ba6cc656a6bb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4654290
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>