git-common: Explicitly specify utf-8 when encoding.

Bug: 1012773
Change-Id: I95006ce78b4473c8fb435162089a787b57c0f835
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1850926
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
2 files changed
tree: c4cf5a231092dce1eb9694cf36a791d11c6b06e8
  1. bootstrap/
  2. fetch_configs/
  3. git-templates/
  4. infra/
  5. man/
  6. recipes/
  7. support/
  8. testing_support/
  9. tests/
  10. third_party/
  11. win_toolchain/
  12. zsh-goodies/
  13. .gitattributes
  14. .gitignore
  15. .style.yapf
  16. .vpython
  17. .vpython3
  18. annotated_gclient.py
  19. auth.py
  20. autoninja
  21. autoninja.bat
  22. autoninja.py
  23. bb
  24. bb.bat
  25. bootstrap_python3
  26. breakpad.py
  27. cipd
  28. cipd.bat
  29. cipd.ps1
  30. cipd_bin_setup.bat
  31. cipd_bin_setup.sh
  32. cipd_client_version
  33. cipd_client_version.digests
  34. cipd_manifest.txt
  35. cipd_manifest.versions
  36. cit
  37. cit.bat
  38. cit.py
  39. clang-format
  40. clang-format.bat
  41. clang_format.py
  42. clang_format_merge_driver
  43. clang_format_merge_driver.bat
  44. clang_format_merge_driver.py
  45. codereview.settings
  46. compile_single_file
  47. compile_single_file.bat
  48. compile_single_file.py
  49. cpplint.bat
  50. cpplint.py
  51. cpplint_chromium.py
  52. CROS_OWNERS
  53. crosjobs
  54. dart_format.py
  55. depot-tools-auth
  56. depot-tools-auth.bat
  57. depot-tools-auth.py
  58. detect_host_arch.py
  59. download_from_google_storage
  60. download_from_google_storage.bat
  61. download_from_google_storage.py
  62. ensure_bootstrap
  63. fetch
  64. fetch.bat
  65. fetch.py
  66. fix_encoding.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_dates.py
  107. git_drover.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. gsutil.py
  128. gsutil.py.bat
  129. gsutil.vpython
  130. led
  131. led.bat
  132. LICENSE
  133. luci-auth
  134. luci-auth.bat
  135. lucicfg
  136. lucicfg.bat
  137. mac_toolchain
  138. metrics.py
  139. metrics.README.md
  140. metrics_utils.py
  141. my_activity.py
  142. ninja
  143. ninja-linux32
  144. ninja-linux64
  145. ninja-mac
  146. ninja.exe
  147. ninjalog.README.md
  148. ninjalog_uploader.py
  149. ninjalog_uploader_wrapper.py
  150. OWNERS
  151. owners.py
  152. owners_finder.py
  153. post_build_ninja_summary.py
  154. PRESUBMIT.py
  155. presubmit_canned_checks.py
  156. presubmit_support.py
  157. profile.xml
  158. prpc
  159. prpc.bat
  160. pylint
  161. pylint-1.5
  162. pylint-1.6
  163. pylint-1.7
  164. pylint-1.8
  165. pylint-1.9
  166. pylint.bat
  167. pylint_main.py
  168. pylintrc
  169. python_runner.sh
  170. README.gclient.md
  171. README.git-cl.md
  172. README.md
  173. repo
  174. roll-dep
  175. roll-dep-svn
  176. roll-dep-svn.bat
  177. roll-dep.bat
  178. roll_dep.py
  179. roll_dep_svn.py
  180. scm.py
  181. setup_color.py
  182. split_cl.py
  183. subcommand.py
  184. subprocess2.py
  185. update_depot_tools
  186. update_depot_tools.bat
  187. update_depot_tools_toggle.py
  188. upload_metrics.py
  189. upload_to_google_storage.py
  190. vpython
  191. vpython.bat
  192. vpython3
  193. vpython3.bat
  194. watchlists.py
  195. weekly
  196. wtf
  197. yapf
  198. yapf.bat
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.