presubmit: make upload_findings_from_result public

So that it can be used in downstream recipes like:
https://source.chromium.org/chromium/infra/infra_superproject/+/main:build/recipes/recipes/run_presubmit.py

Change-Id: I39336f4ae7f8ce4208836ed20d912a7d9ad06fec
Bug: 404837554
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6486487
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2 files changed
tree: 00f5e65ae950fbfdf01089fd63b64753f6a9d572
  1. bootstrap/
  2. fetch_configs/
  3. hooks/
  4. infra/
  5. infra_lib/
  6. man/
  7. metadata/
  8. python-bin/
  9. python2-bin/
  10. recipes/
  11. testing_support/
  12. tests/
  13. third_party/
  14. win_toolchain/
  15. zsh-goodies/
  16. .cipd_impl.ps1
  17. .flake8
  18. .git-blame-ignore-revs
  19. .gitattributes
  20. .gitignore
  21. .isort.cfg
  22. .style.yapf
  23. .vpython3
  24. android_build_server_helper.py
  25. auth.py
  26. autoninja
  27. autoninja.bat
  28. autoninja.py
  29. bazel.py
  30. bb
  31. bb.bat
  32. black
  33. bootstrap_python3
  34. breakpad.py
  35. BUILD_OWNERS
  36. build_telemetry
  37. build_telemetry.bat
  38. build_telemetry.py
  39. cipd
  40. cipd.bat
  41. cipd_bin_setup.bat
  42. cipd_bin_setup.sh
  43. cipd_client_version
  44. cipd_client_version.digests
  45. cipd_manifest.txt
  46. cipd_manifest.versions
  47. cipd_manifest_cros_python2.txt
  48. cipd_manifest_cros_python2.versions
  49. clang-format
  50. clang-format.bat
  51. clang_format.py
  52. codereview.settings
  53. compile_single_file
  54. compile_single_file.bat
  55. compile_single_file.py
  56. cpplint.bat
  57. cpplint.py
  58. cpplint_chromium.py
  59. cros
  60. CROS_OWNERS
  61. cros_python2.vpython
  62. detect_host_arch.py
  63. DIR_METADATA
  64. dirmd
  65. dirmd.bat
  66. download_from_google_storage
  67. download_from_google_storage.bat
  68. download_from_google_storage.py
  69. ensure_bootstrap
  70. fetch
  71. fetch.bat
  72. fetch.py
  73. gclient
  74. gclient-new-workdir.py
  75. gclient.bat
  76. gclient.py
  77. gclient_completion.sh
  78. gclient_eval.py
  79. gclient_paths.py
  80. gclient_scm.py
  81. gclient_utils.py
  82. gerrit_client.py
  83. gerrit_util.py
  84. git-cache
  85. git-cl
  86. git-credential-luci
  87. git-credential-luci.bat
  88. git-crrev-parse
  89. git-drover
  90. git-find-releases
  91. git-footers
  92. git-freeze
  93. git-gs
  94. git-hyper-blame
  95. git-map
  96. git-map-branches
  97. git-mark-merge-base
  98. git-nav-downstream
  99. git-nav-upstream
  100. git-new-branch
  101. git-number
  102. git-rebase-update
  103. git-rename-branch
  104. git-reparent-branch
  105. git-retry
  106. git-runhooks
  107. git-squash-branch
  108. git-squash-branch-tree
  109. git-thaw
  110. git-upstream-diff
  111. git_auth.py
  112. git_cache.py
  113. git_cl.py
  114. git_cl_completion.sh
  115. git_common.py
  116. git_completion.sh
  117. git_dates.py
  118. git_find_releases.py
  119. git_footers.py
  120. git_freezer.py
  121. git_hyper_blame.py
  122. git_map.py
  123. git_map_branches.py
  124. git_mark_merge_base.py
  125. git_nav_downstream.py
  126. git_new_branch.py
  127. git_number.py
  128. git_rebase_update.py
  129. git_rename_branch.py
  130. git_reparent_branch.py
  131. git_retry.py
  132. git_squash_branch.py
  133. git_squash_branch_tree.py
  134. git_upstream_diff.py
  135. gn
  136. gn.bat
  137. gn.py
  138. gn_helper.py
  139. google-java-format
  140. google-java-format.bat
  141. google_java_format.py
  142. gsutil.py
  143. gsutil.py.bat
  144. gsutil.vpython3
  145. isort
  146. led
  147. led.bat
  148. LICENSE
  149. lockfile.py
  150. luci-auth
  151. luci-auth.bat
  152. LUCI_OWNERS
  153. lucicfg
  154. lucicfg.bat
  155. mac_toolchain
  156. metrics-xml-format
  157. metrics.py
  158. metrics.README.md
  159. metrics_utils.py
  160. metrics_xml_format.py
  161. my_activity.py
  162. newauth.py
  163. ninja
  164. ninja.bat
  165. ninja.py
  166. ninjalog_uploader.py
  167. OWNERS
  168. owners_client.py
  169. owners_finder.py
  170. pinpoint
  171. pinpoint.bat
  172. post_build_ninja_summary.py
  173. PRESUBMIT.py
  174. presubmit_canned_checks.py
  175. presubmit_diff.py
  176. presubmit_support.py
  177. prpc
  178. prpc.bat
  179. pylint-2.17
  180. pylint-2.17.bat
  181. pylint-2.6
  182. pylint-2.6.bat
  183. pylint-2.7
  184. pylint-2.7.bat
  185. pylint-3.2
  186. pylint-3.2.bat
  187. pylint_main.py
  188. pylintrc-2.17
  189. pylintrc-2.6
  190. pylintrc-2.7
  191. pylintrc-3.2
  192. python_runner.sh
  193. rdb
  194. rdb.bat
  195. rdb_wrapper.py
  196. README.gclient.md
  197. README.git-cl.md
  198. README.google_cloud_storage.md
  199. README.md
  200. reclient_helper.py
  201. RECLIENT_OWNERS
  202. reclientreport
  203. reclientreport.bat
  204. reclientreport.py
  205. repo
  206. repo_launcher
  207. roll-dep
  208. roll-dep.bat
  209. roll_dep.py
  210. roll_downstream_gcs_deps.py
  211. rustfmt.py
  212. scm.py
  213. setup_color.py
  214. siso
  215. siso.bat
  216. siso.py
  217. split_cl.py
  218. subcommand.py
  219. subprocess2.py
  220. swift-format
  221. swift_format.py
  222. update_depot_tools
  223. update_depot_tools.bat
  224. update_depot_tools_toggle.py
  225. upload_metrics.py
  226. upload_to_google_storage.py
  227. upload_to_google_storage_first_class.py
  228. utils.py
  229. vpython3
  230. vpython3.bat
  231. WATCHLISTS
  232. watchlists.py
  233. whitespace.txt
  234. win32imports.py
  235. yapf
  236. yapf.bat
README.md

depot_tools

Tools for working with Chromium development. It requires python 3.8.

Tools

The most important tools are:

  • fetch: A gclient wrapper to checkout a project. Use fetch --help for more details.
  • gclient: A meta-checkout tool. Think repo or git submodules, except that it support OS-specific rules, e.g. do not checkout Windows only dependencies when checking out for Android. Use gclient help for more details and README.gclient.md.
  • git cl: A code review tool to interact with Rietveld or Gerrit. Use git cl help for more details and README.git-cl.md.
  • roll-dep: A gclient dependency management tool to submit a dep roll, updating a dependency to a newer revision.

There are a lot of git utilities included.

Updating

depot_tools updates itself automatically when running gclient tool. To disable auto update, set the environment variable DEPOT_TOOLS_UPDATE=0 or run ./update_depot_tools_toggle.py --disable.

To update package manually, run update_depot_tools.bat on Windows, or ./update_depot_tools on Linux or Mac.

On Windows only, running gclient will install python.

Contributing

To contribute change for review:

git new-branch <somename>
# Hack
git add .
git commit -a -m "Fixes goat teleporting"
# find reviewers
git cl owners
git log -- <yourfiles>

# Request a review.
git cl upload -r reviewer1@chromium.org,reviewer2@chromium.org --send-mail

# Edit change description if needed.
git cl desc

# If change is approved, flag it to be committed.
git cl set-commit

# If change needs more work.
git rebase-update
...
git cl upload -t "Fixes goat teleporter destination to be Australia"

See also open bugs, open reviews, forum or report problems.

cpplint.py

Until 2018, our cpplint.py was a copy of the upstream version at https://github.com/google/styleguide/tree/gh-pages/cpplint. Unfortunately, that repository is not maintained any more. If you want to update cpplint.py in depot_tools, just upload a patch to do so. We will figure out a long-term strategy via issue https://crbug.com/916550.