[git_cl] Adding OLD_AUTH config mode

Can be used to remove config changes.  Not called yet.

There's some logic duplication, will try to clean up later.

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