[gerrit_util] Revise comments on SSOAuthenticator.

Previous comments on SSOAuthenticator were incorrect (the
git-remote-sso process does NOT need to persist). Remove comments
which were inconsistent with the code, and add an explainer on why
the _launch_sso_helper method is written the way it is.

R=ayatane, yiwzhang

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

Note that the cpplint.py here is also used by the Tricium analyzer, so if the cpplint.py here changes, we should also update the copy used there.