Add a --squash option to Gerrit uploads.

This makes uploading to Gerrit with `git cl` more similar to uploading to Rietveld, by uploading a squashed commit containing the diff to the newest common ancestor.

Uploaded commits are stored in refs/heads/git_cl_uploads/<branch> (and their commit message is used for the squash commit), which allows amending the commit message to change it on the uploaded CL, and looking through the reflog to find old uploaded versions.

BUG=none

Review URL: https://codereview.chromium.org/200023004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294077 0039d316-1c4b-4281-b951-d872f2087c98
2 files changed
tree: b23f906220969b9ce56477cb3cc131870e05d19b
  1. bootstrap/
  2. git-templates/
  3. git_utils/
  4. man/
  5. recipes/
  6. support/
  7. testing_support/
  8. tests/
  9. third_party/
  10. win_toolchain/
  11. zsh-goodies/
  12. .gitignore
  13. annotated_gclient.py
  14. apply_issue
  15. apply_issue.bat
  16. apply_issue.py
  17. breakpad.py
  18. checkout.py
  19. chrome-update-create-task.bat
  20. chrome-update.bat
  21. chrome-update.py
  22. clang-format
  23. clang-format.bat
  24. clang_format.py
  25. codereview.settings
  26. commit_queue.py
  27. cpplint.bat
  28. cpplint.py
  29. cpplint_chromium.py
  30. create-chromium-git-src
  31. create-ntfs-junction.c
  32. create-ntfs-junction.exe
  33. download_from_google_storage
  34. download_from_google_storage.bat
  35. download_from_google_storage.py
  36. drover
  37. drover.bat
  38. drover.py
  39. fetch
  40. fetch.bat
  41. fetch.py
  42. fix_encoding.py
  43. gcl
  44. gcl.bat
  45. gcl.py
  46. gclient
  47. gclient-new-workdir.py
  48. gclient.bat
  49. gclient.py
  50. gclient_completion.sh
  51. gclient_scm.py
  52. gclient_utils.py
  53. gerrit_util.py
  54. git-auto-svn
  55. git-cache
  56. git-cherry-pick-upload
  57. git-cl
  58. git-cl-upload-hook
  59. git-crrev-parse
  60. git-crsync
  61. git-crup
  62. git-footers
  63. git-freeze
  64. git-gs
  65. git-lkgr
  66. git-map
  67. git-map-branches
  68. git-mark-merge-base
  69. git-nav-downstream
  70. git-nav-upstream
  71. git-new-branch
  72. git-number
  73. git-rebase-update
  74. git-rename-branch
  75. git-reparent-branch
  76. git-retry
  77. git-runhooks
  78. git-squash-branch
  79. git-thaw
  80. git-try
  81. git-upstream-diff
  82. git_auto_svn.py
  83. git_cache.py
  84. git_cherry_pick_upload.py
  85. git_cl.py
  86. git_common.py
  87. git_footers.py
  88. git_freezer.py
  89. git_map.py
  90. git_map_branches.py
  91. git_mark_merge_base.py
  92. git_nav_downstream.py
  93. git_new_branch.py
  94. git_number.py
  95. git_rebase_update.py
  96. git_rename_branch.py
  97. git_reparent_branch.py
  98. git_retry.py
  99. git_squash_branch.py
  100. git_try.py
  101. git_upstream_diff.py
  102. gn
  103. gn.bat
  104. gn.py
  105. gsutil.py
  106. hammer
  107. hammer.bat
  108. LICENSE
  109. my_activity.py
  110. my_reviews.py
  111. ninja
  112. ninja-linux32
  113. ninja-linux64
  114. ninja-mac
  115. ninja.exe
  116. OWNERS
  117. owners.py
  118. owners_finder.py
  119. patch.py
  120. PRESUBMIT.py
  121. presubmit_canned_checks.py
  122. presubmit_support.py
  123. profile.xml
  124. pylint
  125. pylint.py
  126. pylintrc
  127. python_git_runner.sh
  128. README
  129. README.codereview
  130. README.gclient
  131. README.git-cl
  132. README.testing
  133. repo
  134. rietveld.py
  135. roll-dep
  136. roll-dep.bat
  137. roll_dep.py
  138. scm.py
  139. subcommand.py
  140. subprocess2.py
  141. trychange.py
  142. update_depot_tools
  143. update_depot_tools.bat
  144. upload_to_google_storage.py
  145. WATCHLISTS
  146. watchlists.py
  147. weekly
  148. wtf