git_cl: rename params and reduce indent

Cosmetic changes for consistent param names and unnecessary indents.

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

Also, includes shell script/batch file for tools required to build chromium, e.g.

  • gn: a meta-build system that generates build files for Ninja
  • autoninja: a wrapper for siso and ninja.
  • siso: a build tool that aims to significantly speed up Chromium's build.
  • ninja: a small build system with a focus on speed. deprecated by Siso.

These shell script/batch file runs python script with python-bin/python3 that find binaries in chromium checkout, and run with proper setup/check. To use these wrappers, you need to initialize/bootstrap depot_tools (using gclient, update_depot_tools or ensure_bootstrap).

Installing

See set-up documentation.

depot_tools is also available in

These depot_tools would not be initialized/bootstrapped (i.e. no python-bin/python3 binary available), so the build tool wrapper won't work, unless it is explicitly initialized by ensure_bootstrap. Or, directly call the python script instead of using the shell script/batch file.

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.

Running gclient will install python3 binary.

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.