Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To send a patch for review, you should push it to a Gerrit-specific 'branch' on the Gerrit remote. That branch has the form form refs/drafts/<branch-name> or refs/for/<branch-name>. Use the draft form to review the change yourself, or use the "for" form to publish the review to the community immediately. For the vast majority of patches the target branch will be master, which is where all mainline development happens. During releases, release managers may push commits to a specific release branch, however most new development will happen on master.

One thing to note is that Gerrit will send all patches between the HEAD of the target branch and your current branch's HEAD for review. So:

...

In the example below, we're pushing HEAD to be a draft change. Gerrit provides a URL for the review.

Code Block
$ git push asf-gerrit HEAD:refs/

...

drafts/master

...

Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 332 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2)
remote: Processing changes: new: 1, refs: 1, done
remote:
remote: New Changes:
remote:   http://gerrit.cloudera.org:8080/8335 test [DRAFT]
remote:
To ssh://XXXX@gerrit.cloudera.org:29418/Impala-ASF

Visit the URL that Gerrit provided to review the diff before sending it out to reviewers. Check that you've uploaded the right commit and that you've included what you wanted in the diff. When you've reviewed it, hit the Publish button (Image Added) to send the review to the community.

Note that Gerrit will send all patches between the HEAD of the target branch and your current branch's HEAD for review. Please therefore make certain that you are only pushing the commits you want reviewed: every separate commit translates to an e-mail in everyone's inbox!

... will push all commits between asf-gerrit/master and your HEAD. Please therefore make certain that you are only pushing the commits you want reviewed: every separate commit translates to an e-mail in everyone's inbox!

Testing your configuration

If you want to check that you set up gerrit correctly, you can

Code Block
git push --no-thin asf-gerrit HEAD:refs/drafts/master

This will push a patch that only you can see. When you see it has worked, you can click "Abandon" on it in the web interface.

Verifying a patch (open to all Impala contributors)

...