commit | 9387b4f0be621a3027848e0624a3ca3a70ee5195 | [log] [tgz] |
---|---|---|
author | Aaron Gable <[email protected]> | Thu Jun 08 17:50:03 2017 |
committer | Commit Bot <[email protected]> | Thu Jun 08 17:54:22 2017 |
tree | f2533953758dfdfb9d16999eb314e17e5205a771 | |
parent | 7303dcb9b399b67cc533d32109b2e4f1da8147e2 [diff] |
Make gerrit 'git cl patch' use hard reset by default This CL changes the way that "git cl patch" behaves for Gerrit changes. Previously, git-cl-patch behaved just like it did for Rietveld: make sure you're on a branch, download the diff, apply it on top of your branch. However, this causes problems with Gerrit. Namely, when you upload a change to Gerrit, git-cl has to make sure that all parents of your local change have previously been uploaded as well, either as other changes or as commits already landed on the target branch. But the method for "applying a patch" from Gerrit was to cherry-pick it, and that changes the commit hash. So the resulting commit would *not* have been uploaded to Gerrit. Thus, the following routine didn't work with Gerrit: $ git checkout -t origin/master -b your-work $ git cl patch 123456 $ git checkout -tb my-work $ #hack and commit $ git cl upload This would fail during the upload with a message saying that the contents of 'your-work' hadn't been uploaded. This CL fixes the situation by replacing the cherry-pick with a hard reset. This means that the contents of the 'your-work' branch will be *exactly* what was downloaded from Gerrit. Uploads based on top of that commit will work just fine. Finally, in a concession to some people who want 'git cl patch' to actually apply a patch instead of performing a hard reset, if the current branch contains local work, then rather than leaving that work behind with a hard reset, we fall back to the old cherry-pick behavior with a confirmation dialog and warning that uploading will be hard. Bug: 723787 Change-Id: I3ad164f6d3078bff00139d446bb8ce97738a1344 Reviewed-on: https://chromium-review.googlesource.com/527345 Commit-Queue: Aaron Gable <[email protected]> Reviewed-by: Andrii Shyshkalov <[email protected]>
Tools for working with Chromium development. It requires python 2.7.
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.
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
.
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.
To update cpplint.py, please submit the change upstream first at https://github.com/google/styleguide/tree/gh-pages/cpplint then copy it down.