Use $HOME/.config/depot_tools on linux for .cfg files

Or $XDG_CONFIG_HOME/.config/depot_tools if set

A followup CL can add support for win/macos.

Bug: b/345092320
Change-Id: I877baa4d7fd912b42cfcd88ad0aa347b700a89f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5604606
Commit-Queue: Richard Wang <richardwa@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
7 files changed
tree: cb7ac4f6f01b34839a06d48905bc54e604c962d1
  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-crrev-parse
  81. git-drover
  82. git-find-releases
  83. git-footers
  84. git-freeze
  85. git-gs
  86. git-hyper-blame
  87. git-map
  88. git-map-branches
  89. git-mark-merge-base
  90. git-nav-downstream
  91. git-nav-upstream
  92. git-new-branch
  93. git-number
  94. git-rebase-update
  95. git-rename-branch
  96. git-reparent-branch
  97. git-retry
  98. git-runhooks
  99. git-squash-branch
  100. git-thaw
  101. git-upstream-diff
  102. git_cache.py
  103. git_cl.py
  104. git_cl_completion.sh
  105. git_common.py
  106. git_completion.sh
  107. git_dates.py
  108. git_find_releases.py
  109. git_footers.py
  110. git_freezer.py
  111. git_hyper_blame.py
  112. git_map.py
  113. git_map_branches.py
  114. git_mark_merge_base.py
  115. git_nav_downstream.py
  116. git_new_branch.py
  117. git_number.py
  118. git_rebase_update.py
  119. git_rename_branch.py
  120. git_reparent_branch.py
  121. git_retry.py
  122. git_squash_branch.py
  123. git_upstream_diff.py
  124. gn
  125. gn.bat
  126. gn.py
  127. google-java-format
  128. google-java-format.bat
  129. google_java_format.py
  130. gsutil.py
  131. gsutil.py.bat
  132. gsutil.vpython3
  133. isort
  134. led
  135. led.bat
  136. LICENSE
  137. lockfile.py
  138. luci-auth
  139. luci-auth.bat
  140. LUCI_OWNERS
  141. lucicfg
  142. lucicfg.bat
  143. mac_toolchain
  144. metrics.py
  145. metrics.README.md
  146. metrics_utils.py
  147. my_activity.py
  148. ninja
  149. ninja.bat
  150. ninja.py
  151. ninja_reclient.py
  152. ninjalog.README.md
  153. ninjalog_uploader.py
  154. ninjalog_uploader_wrapper.py
  155. OWNERS
  156. owners_client.py
  157. owners_finder.py
  158. pinpoint
  159. pinpoint.bat
  160. post_build_ninja_summary.py
  161. PRESUBMIT.py
  162. presubmit_canned_checks.py
  163. presubmit_diff.py
  164. presubmit_support.py
  165. prpc
  166. prpc.bat
  167. pylint-2.17
  168. pylint-2.17.bat
  169. pylint-2.6
  170. pylint-2.6.bat
  171. pylint-2.7
  172. pylint-2.7.bat
  173. pylint_main.py
  174. pylintrc
  175. pylintrc-2.17
  176. python_runner.sh
  177. rdb
  178. rdb.bat
  179. rdb_wrapper.py
  180. README.gclient.md
  181. README.git-cl.md
  182. README.md
  183. reclient_helper.py
  184. reclient_metrics
  185. reclient_metrics.bat
  186. reclient_metrics.py
  187. reclient_metrics.README.md
  188. RECLIENT_OWNERS
  189. reclientreport
  190. reclientreport.bat
  191. reclientreport.py
  192. repo
  193. repo_launcher
  194. roll-dep
  195. roll-dep.bat
  196. roll_dep.py
  197. rustfmt.py
  198. scm.py
  199. setup_color.py
  200. siso
  201. siso.bat
  202. siso.py
  203. split_cl.py
  204. subcommand.py
  205. subprocess2.py
  206. swift-format
  207. swift_format.py
  208. update_depot_tools
  209. update_depot_tools.bat
  210. update_depot_tools_toggle.py
  211. upload_metrics.py
  212. upload_to_google_storage.py
  213. upload_to_google_storage_first_class.py
  214. utils.py
  215. vpython3
  216. vpython3.bat
  217. WATCHLISTS
  218. watchlists.py
  219. whitespace.txt
  220. win32imports.py
  221. yapf
  222. 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.