These are the licenses that are currently in chromium and are 'unencumbered', 'permissive', or 'notice' licenses
Change-Id: I40281cdb2e8b7e1af7a06e0ff234e2005903d8c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6055002
Reviewed-by: Jordan Brown <rop@google.com>
Reviewed-by: Rachael Newitt <renewitt@google.com>
Commit-Queue: Jordan Brown <rop@google.com>
.. to show license classifications via comments
Change-Id: Id18ee6a597457ecaaafbd24373d78aca09ba7058
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6055001
Commit-Queue: Jordan Brown <rop@google.com>
Reviewed-by: Jordan Brown <rop@google.com>
Reviewed-by: Rachael Newitt <renewitt@google.com>
metrics_xml_format.py has a check to ensure that the given xml
is located in the current checkout using GetPrimarySolutionPath().
The problem is that GetPrimarySolutionPath() adds "src" if the path
doesn't end with "src".
https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:gclient_paths.py;l=78-79
The workspace in Cog doesn't have "src" in the path. Instead, it creates
a workspace at /..../$workspace_name/$repo_name, which doesn't match
GetPrimarySolutionPath() because the workspace root doesn't end with
'src'.
This must be a common problem in other modules, and Cog gets around
this issue by creating a symlink, 'src', to the workspace root.
This CL replaces os.path.abspath() with os.path.realpath() so that
the check is done properly.
Bug: b/369827156
Change-Id: Iaf56de0a9ccbd168004c4c80672c9dd18211bf5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6094779
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Change the delimiter for license field from allowing complex cases using "and", "or", and "/" to only allowing a single comma separated list of licenses that are in use.
When given a choice of licenses OWNERS should choose the most appropriate and list this one. In nearly all cases this should be 'whichever is the least restrictive'.
Corresponding change in documentation: https://crrev.com/c/6068628
Change-Id: Ic30dfacb9ba586137b9493cec878b636107a55f4
Bug: 311097536
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6055313
Reviewed-by: Jordan Brown <rop@google.com>
Commit-Queue: Rachael Newitt <renewitt@google.com>
Auto-Submit: Jordan Brown <rop@google.com>
Reviewed-by: Rachael Newitt <renewitt@google.com>
git cl format supports formatting certain xml files under tools/metrics.
This CL adds metrics_xml_formatter so that the formatter can be run
with git cl format.
Bug: b/369827156
Change-Id: I5922cd79304aa8e06917aacc9f2d9bd3ed548c2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6072565
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
- Starts the build server when the build starts.
- Writes tty filename to env variable.
- Tells the build server about the current build so it does not exit
until autoninja does, even if idle.
- Cancels pending tasks on Ctrl+c.
Change-Id: I86bb9852bd0975f381b049b9ff21c38eef7cef9d
Bug: 370589852
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5917985
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Mohamed Heikal <mheikal@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Logs a warning if reading the config fails. Still logs a warning for
recommended settings, so the user can create their global config.
Annoyingly, the exit code is the same for missing config file as it is
for an existing but invalid file.
Bug: b/382395049
Change-Id: I81113ff248f7a5eed2f9fd0303e0e81ae80d7d3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6086756
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Anne Redulla <aredulla@google.com>
In git 2.41, both `list` and `unset` are only options, `--list` and `--unset` respectively. See https://git-scm.com/docs/git-config/2.41.0
These modes are deprecated in later versions; it is recommended to
migrate to the newer syntax, but the old syntax is still supported.
Bug: b/382395049
Change-Id: I9150983084b91279e4f4587a80737e6813937cd6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6083215
Commit-Queue: Anne Redulla <aredulla@google.com>
Reviewed-by: Peter Boström <pbos@chromium.org>
Owners-Override: Anne Redulla <aredulla@google.com>
The Windows global Git config bootstrapping shows a warning if you have
not agreed to depot_tools automatically managing your global Git config.
To silence this warning, a user must either:
(1) explicitly allow to automatic management; or
(2) explicitly deny automatic management.
This CL adds a third way to prevent the warning:
(3) The existing global Git config already has the desired values.
Consequently, depot-tools.gitPostprocessVersion is redundant
and has been removed.
Bug: b/382395049
Change-Id: I18260962ee9647578e61993b191e9f76e99b342b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6072987
Commit-Queue: Anne Redulla <aredulla@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Use the "official" XML schema validation pattern from published CPE
schema.
Add a error message to tell owners that they need to provide at least
one component (other than part) in CPE URN format.
Bug: 378273455
Change-Id: I5ac957f02a0f899d069161cdce54fff499fb35f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6073136
Commit-Queue: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Anne Redulla <aredulla@google.com>
LINT.ThenChange is followed by path which sometimes may exceed the
length limit
Bug: 382239821
Change-Id: I2142fd3326704593bd46c8937b1bb904bcef4763
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6077446
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
When a license validation warning is generated, link to the allowlist file for easy fixing.
Bug: 382745675
Change-Id: I4899401a687ce06e74cd18a95e1a28a2684a8027
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6076211
Reviewed-by: Jordan Brown <rop@google.com>
Commit-Queue: Jordan Brown <rop@google.com>
Reviewed-by: Rachael Newitt <renewitt@google.com>
Auto-Submit: Jordan Brown <rop@google.com>
git-credential-luci is very similar to luci-auth, except that it is
expressly for git/Gerrit. Therefore, it hard codes the scopes needed
for git/Gerrit. It's also a separate binary, which makes it more
convenient for us to configure it for ReAuth later.
Bug: b/382341041
Change-Id: I7de56d3922adac7eb4671849eb6e30be310d4de7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6073043
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
The gclient config refers to a repo that is no longer used and includes
non-inclusive language.
Bug: 40712760
Change-Id: Id7faec4beefdc4387cd8860910e43cbdcac3625a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6070412
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
We already have another check for long lines for all languages, we don't
need to block pylint on the same.
Change-Id: I2abc65380a482242a6fde380ba3d8e28a5ba781a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6062830
Reviewed-by: Andy Perelson <ajp@google.com>
Commit-Queue: Andy Perelson <ajp@google.com>
This CL makes searching for an existing system installation of Git
the default behavior.
If a direct Git installation is not found, a warning will be
logged and the bundled Git for Windows will be used instead.
Bug: b/360206460
Change-Id: I48d68b2bf193865ca573199b42e7838c28f1e3cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6068030
Reviewed-by: Allen Li <ayatane@chromium.org>
Commit-Queue: Anne Redulla <aredulla@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Git has been using version 2 of their wire protocol by default since
2.26, released in 2020. Stop setting it explicitely.
Change-Id: Ibc93a672b41c5a8183bc3200c506006f6e08af94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6070782
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
May help user to diagnose/debug some issues.
Bug: b/372552465
Change-Id: Ia9fc4fd49c8ee80bccd98442ed5589324d0b23b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6068966
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Allen Li <ayatane@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
Modifying the system-level Git config may require admin privileges,
depending on where Git was installed.
This CL makes the bootstrap.py script target a user's Git config
at the global level, instead of system level.
Checks the global Git config for postprocess version and explicit
enabling of global config changing. Logs a warning if out of date
and not enabled so the user knows how to agree to global config
changes.
Bug: b/379888465, b/360206460
Change-Id: I9be395b64d5429f85514397918f4a6140dfe2a1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6034204
Reviewed-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Anne Redulla <aredulla@google.com>
Gerrit allows multiline footers with indents.
e.g.,
Test: something
looks great
This CL fixes the bug such that add_footer correctly inserts
a given message after multiline footers.
Bug: 379923433
Change-Id: I9b3f793095b63b0586123543a2f8d49f0503fca0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6064963
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
The param before_key used to be used in presubmit_support.py, but
it was removed in 2018, and has never been used anywhere since.
- https://crrev.com/c/1351509
- http://shortn/_YQUh4yC9Tc
This CL removes it to simplify the code before the next CL.
It hasn't been used for several years and will unlikely be used
in the future.
Bug: 379923433
Change-Id: Ib0da340235a991b6d8edca041eae811540d4aa60
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6064306
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>