Fix gerrit git-cl-status to be simpler and correct

The loop over the messages didn't early-exit when it found
a non-CQ message, so it would continue looking until it
found any message by a non-owner. So all CLs with any comments
by anyone other than the uploader would be in 'reply' state
forever.

This CL fixes that, and also makes some other tweaks to
make the gerrit status code simpler and faster.

Bug: 706460
Change-Id: I5cc06962f5121fe042a315e5e2e205e556eb85da
Reviewed-on: https://chromium-review.googlesource.com/470586
Reviewed-by: Andrii Shyshkalov <[email protected]>
Commit-Queue: Aaron Gable <[email protected]>
1 file changed
tree: b062b907de72cd753cbb5d58953149eab2e5d6ab
  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. .gitignore
  14. .style.yapf
  15. annotated_gclient.py
  16. appengine_mapper.py
  17. apply_issue
  18. apply_issue.bat
  19. apply_issue.py
  20. auth.py
  21. breakpad.py
  22. buildbucket.py
  23. checkout.py
  24. cipd
  25. cipd.bat
  26. cipd.ps1
  27. cipd_client_version
  28. cit
  29. cit.bat
  30. cit.py
  31. clang-format
  32. clang-format.bat
  33. clang_format.py
  34. clang_format_merge_driver
  35. clang_format_merge_driver.bat
  36. clang_format_merge_driver.py
  37. codereview.settings
  38. commit_queue
  39. commit_queue.bat
  40. commit_queue.py
  41. cpplint.bat
  42. cpplint.py
  43. cpplint_chromium.py
  44. create-ntfs-junction.c
  45. create-ntfs-junction.exe
  46. dart_format.py
  47. depot-tools-auth
  48. depot-tools-auth.bat
  49. depot-tools-auth.py
  50. download_from_google_storage
  51. download_from_google_storage.bat
  52. download_from_google_storage.py
  53. fetch
  54. fetch.bat
  55. fetch.py
  56. fix_encoding.py
  57. gclient
  58. gclient-new-workdir.py
  59. gclient.bat
  60. gclient.py
  61. gclient_completion.sh
  62. gclient_scm.py
  63. gclient_utils.py
  64. gerrit_client.py
  65. gerrit_util.py
  66. git-cache
  67. git-cherry-pick-upload
  68. git-cl
  69. git-crrev-parse
  70. git-crsync
  71. git-drover
  72. git-find-releases
  73. git-footers
  74. git-freeze
  75. git-gs
  76. git-hyper-blame
  77. git-map
  78. git-map-branches
  79. git-mark-merge-base
  80. git-nav-downstream
  81. git-nav-upstream
  82. git-new-branch
  83. git-number
  84. git-rebase-update
  85. git-rename-branch
  86. git-reparent-branch
  87. git-retry
  88. git-runhooks
  89. git-squash-branch
  90. git-thaw
  91. git-upstream-diff
  92. git_cache.py
  93. git_cherry_pick_upload.py
  94. git_cl.py
  95. git_cl_completion.sh
  96. git_common.py
  97. git_dates.py
  98. git_drover.py
  99. git_find_releases.py
  100. git_footers.py
  101. git_freezer.py
  102. git_hyper_blame.py
  103. git_map.py
  104. git_map_branches.py
  105. git_mark_merge_base.py
  106. git_nav_downstream.py
  107. git_new_branch.py
  108. git_number.py
  109. git_rebase_update.py
  110. git_rename_branch.py
  111. git_reparent_branch.py
  112. git_retry.py
  113. git_squash_branch.py
  114. git_upstream_diff.py
  115. gn
  116. gn.bat
  117. gn.py
  118. gsutil.py
  119. LICENSE
  120. my_activity.py
  121. my_reviews.py
  122. ninja
  123. ninja-linux32
  124. ninja-linux64
  125. ninja-mac
  126. ninja.exe
  127. OWNERS
  128. owners.py
  129. owners_finder.py
  130. patch.py
  131. PRESUBMIT.py
  132. presubmit_canned_checks.py
  133. presubmit_support.py
  134. profile.xml
  135. pylint
  136. pylint.py
  137. pylintrc
  138. python_runner.sh
  139. README.gclient.md
  140. README.git-cl.md
  141. README.md
  142. README.testing
  143. repo
  144. rietveld.py
  145. roll-dep
  146. roll-dep-svn
  147. roll-dep-svn.bat
  148. roll-dep.bat
  149. roll_dep.py
  150. roll_dep_svn.py
  151. scm.py
  152. setup_color.py
  153. subcommand.py
  154. subprocess2.py
  155. update_depot_tools
  156. update_depot_tools.bat
  157. upload_to_google_storage.py
  158. WATCHLISTS
  159. watchlists.py
  160. weekly
  161. wtf
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 [email protected],[email protected] --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

To update cpplint.py, please submit the change upstream first at https://github.com/google/styleguide/tree/gh-pages/cpplint then copy it down.