update_depot_tools: Use git checkout -q origin/master

Bug: 996359
Change-Id: I7c87fd824103c91c1dd5b9b8975354732e5eb0a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1765839
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
2 files changed
tree: 31ab579e28c83e74417200eab3f8759b4cc782ca
  1. .gitattributes
  2. .gitignore
  3. .style.yapf
  4. .vpython3
  5. CROS_OWNERS
  6. LICENSE
  7. OWNERS
  8. PRESUBMIT.py
  9. README.gclient.md
  10. README.git-cl.md
  11. README.md
  12. annotated_gclient.py
  13. auth.py
  14. autoninja
  15. autoninja.bat
  16. autoninja.py
  17. bb
  18. bb.bat
  19. bootstrap/
  20. breakpad.py
  21. buildbucket.py
  22. cipd
  23. cipd.bat
  24. cipd.ps1
  25. cipd_bin_setup.bat
  26. cipd_bin_setup.sh
  27. cipd_client_version
  28. cipd_client_version.digests
  29. cipd_manifest.txt
  30. cipd_manifest.versions
  31. cit
  32. cit.bat
  33. cit.py
  34. clang-format
  35. clang-format.bat
  36. clang_format.py
  37. clang_format_merge_driver
  38. clang_format_merge_driver.bat
  39. clang_format_merge_driver.py
  40. codereview.settings
  41. compile_single_file
  42. compile_single_file.bat
  43. compile_single_file.py
  44. cpplint.bat
  45. cpplint.py
  46. cpplint_chromium.py
  47. crosjobs
  48. dart_format.py
  49. depot-tools-auth
  50. depot-tools-auth.bat
  51. depot-tools-auth.py
  52. detect_host_arch.py
  53. download_from_google_storage
  54. download_from_google_storage.bat
  55. download_from_google_storage.py
  56. ensure_bootstrap
  57. fetch
  58. fetch.bat
  59. fetch.py
  60. fetch_configs/
  61. fix_encoding.py
  62. gclient
  63. gclient-new-workdir.py
  64. gclient.bat
  65. gclient.py
  66. gclient_completion.sh
  67. gclient_eval.py
  68. gclient_paths.py
  69. gclient_scm.py
  70. gclient_utils.py
  71. gerrit_client.py
  72. gerrit_util.py
  73. git-cache
  74. git-cl
  75. git-crrev-parse
  76. git-drover
  77. git-find-releases
  78. git-footers
  79. git-freeze
  80. git-gs
  81. git-hyper-blame
  82. git-map
  83. git-map-branches
  84. git-mark-merge-base
  85. git-nav-downstream
  86. git-nav-upstream
  87. git-new-branch
  88. git-number
  89. git-rebase-update
  90. git-rename-branch
  91. git-reparent-branch
  92. git-retry
  93. git-runhooks
  94. git-squash-branch
  95. git-templates/
  96. git-thaw
  97. git-upstream-diff
  98. git_cache.py
  99. git_cl.py
  100. git_cl_completion.sh
  101. git_common.py
  102. git_dates.py
  103. git_drover.py
  104. git_find_releases.py
  105. git_footers.py
  106. git_freezer.py
  107. git_hyper_blame.py
  108. git_map.py
  109. git_map_branches.py
  110. git_mark_merge_base.py
  111. git_nav_downstream.py
  112. git_new_branch.py
  113. git_number.py
  114. git_rebase_update.py
  115. git_rename_branch.py
  116. git_reparent_branch.py
  117. git_retry.py
  118. git_squash_branch.py
  119. git_upstream_diff.py
  120. gn
  121. gn.bat
  122. gn.py
  123. gsutil.py
  124. gsutil.py.bat
  125. gsutil.vpython
  126. infra/
  127. led
  128. led.bat
  129. luci-auth
  130. luci-auth.bat
  131. lucicfg
  132. lucicfg.bat
  133. mac_toolchain
  134. man/
  135. metrics.README.md
  136. metrics.py
  137. metrics_utils.py
  138. my_activity.py
  139. ninja
  140. ninja-linux32
  141. ninja-linux64
  142. ninja-mac
  143. ninja.exe
  144. ninjalog.README.md
  145. ninjalog_uploader.py
  146. ninjalog_uploader_wrapper.py
  147. owners.py
  148. owners_finder.py
  149. post_build_ninja_summary.py
  150. presubmit_canned_checks.py
  151. presubmit_support.py
  152. profile.xml
  153. prpc
  154. prpc.bat
  155. pylint
  156. pylint-1.5
  157. pylint-1.6
  158. pylint-1.7
  159. pylint-1.8
  160. pylint-1.9
  161. pylint.bat
  162. pylint_main.py
  163. pylintrc
  164. python_runner.sh
  165. recipes/
  166. repo
  167. roll-dep
  168. roll-dep-svn
  169. roll-dep-svn.bat
  170. roll-dep.bat
  171. roll_dep.py
  172. roll_dep_svn.py
  173. scm.py
  174. setup_color.py
  175. split_cl.py
  176. subcommand.py
  177. subprocess2.py
  178. support/
  179. testing_support/
  180. tests/
  181. third_party/
  182. update_depot_tools
  183. update_depot_tools.bat
  184. update_depot_tools_toggle.py
  185. upload_metrics.py
  186. upload_to_google_storage.py
  187. vpython
  188. vpython.bat
  189. vpython3
  190. vpython3.bat
  191. watchlists.py
  192. weekly
  193. win_toolchain/
  194. wtf
  195. yapf
  196. yapf.bat
  197. zsh-goodies/
README.md

depot_tools

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

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.

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.