git-cl: Add support for setting Bot-Commit+1 on upload.

Some bots use git-cl to upload changes to Gerrit.
Add an option so those can set Bot-Commit+1 on upload
instead of TBR and CR+1.

Change-Id: I5e80ddadedf6c4fe277f8984c35a603da923de5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2679780
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
(cherry picked from commit 10c3dd6f59787243559d651540042d9aa4f79c83)
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2797932
Auto-Submit: Michael Moss <mmoss@chromium.org>
Reviewed-by: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
1 file changed
tree: 64bed641508e5449347b66ab46afa08a2124a6f6
  1. bootstrap/
  2. fetch_configs/
  3. git-templates/
  4. infra/
  5. man/
  6. python-bin/
  7. recipes/
  8. testing_support/
  9. tests/
  10. third_party/
  11. win_toolchain/
  12. zsh-goodies/
  13. .cipd_impl.ps1
  14. .gitattributes
  15. .gitignore
  16. .style.yapf
  17. .vpython
  18. .vpython3
  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_bin_setup.bat
  30. cipd_bin_setup.sh
  31. cipd_client_version
  32. cipd_client_version.digests
  33. cipd_manifest.txt
  34. cipd_manifest.versions
  35. cit
  36. cit.bat
  37. cit.py
  38. clang-format
  39. clang-format.bat
  40. clang_format.py
  41. clang_format_merge_driver
  42. clang_format_merge_driver.bat
  43. clang_format_merge_driver.py
  44. codereview.settings
  45. compile_single_file
  46. compile_single_file.bat
  47. compile_single_file.py
  48. cpplint.bat
  49. cpplint.py
  50. cpplint_chromium.py
  51. cros
  52. CROS_OWNERS
  53. crosjobs
  54. detect_host_arch.py
  55. download_from_google_storage
  56. download_from_google_storage.bat
  57. download_from_google_storage.py
  58. ensure_bootstrap
  59. fetch
  60. fetch.bat
  61. fetch.py
  62. fix_encoding.py
  63. gclient
  64. gclient-new-workdir.py
  65. gclient.bat
  66. gclient.py
  67. gclient_completion.sh
  68. gclient_eval.py
  69. gclient_paths.py
  70. gclient_scm.py
  71. gclient_utils.py
  72. gerrit_client.py
  73. gerrit_util.py
  74. git-cache
  75. git-cl
  76. git-crrev-parse
  77. git-drover
  78. git-find-releases
  79. git-footers
  80. git-freeze
  81. git-gs
  82. git-hyper-blame
  83. git-map
  84. git-map-branches
  85. git-mark-merge-base
  86. git-nav-downstream
  87. git-nav-upstream
  88. git-new-branch
  89. git-number
  90. git-rebase-update
  91. git-rename-branch
  92. git-reparent-branch
  93. git-retry
  94. git-runhooks
  95. git-squash-branch
  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. goma_auth
  124. goma_auth.bat
  125. goma_ctl
  126. goma_ctl.bat
  127. GOMA_OWNERS
  128. gsutil.py
  129. gsutil.py.bat
  130. gsutil.vpython
  131. led
  132. led.bat
  133. LICENSE
  134. luci-auth
  135. luci-auth.bat
  136. LUCI_OWNERS
  137. lucicfg
  138. lucicfg.bat
  139. mac_toolchain
  140. metrics.py
  141. metrics.README.md
  142. metrics_utils.py
  143. my_activity.py
  144. ninja
  145. ninja-linux32
  146. ninja-linux64
  147. ninja-mac
  148. ninja.exe
  149. ninjalog.README.md
  150. ninjalog_uploader.py
  151. ninjalog_uploader_wrapper.py
  152. OWNERS
  153. owners.py
  154. owners_finder.py
  155. post_build_ninja_summary.py
  156. PRESUBMIT.py
  157. presubmit_canned_checks.py
  158. presubmit_support.py
  159. profile.xml
  160. prpc
  161. prpc.bat
  162. pylint
  163. pylint-1.5
  164. pylint-1.6
  165. pylint-1.7
  166. pylint-1.8
  167. pylint-1.9
  168. pylint.bat
  169. pylint_main.py
  170. pylintrc
  171. python_runner.sh
  172. rdb
  173. rdb.bat
  174. README.gclient.md
  175. README.git-cl.md
  176. README.md
  177. repo
  178. roll-dep
  179. roll-dep.bat
  180. roll_dep.py
  181. scm.py
  182. setup_color.py
  183. split_cl.py
  184. subcommand.py
  185. subprocess2.py
  186. update_depot_tools
  187. update_depot_tools.bat
  188. update_depot_tools_toggle.py
  189. upload_metrics.py
  190. upload_to_google_storage.py
  191. vpython
  192. vpython.bat
  193. vpython3
  194. vpython3.bat
  195. WATCHLISTS
  196. watchlists.py
  197. weekly
  198. wtf
  199. yapf
  200. 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.