Register on Gerrit

We are using Gerrit for code review and automatic integration of reviewed patches. You will need to create an account, pick a user name, register your email addresses and add your public SSH key. Gerrit will compare the committer email address in the Git commits with the registered email addresses for your SSH key.

Signing up using OpenID

Our Gerrit is doing authentication based on OpenID. This means you will need to have an account with an OpenID provider. Google and Yahoo are well known providers. After you signed up you need to pick a user name, add your email addresses and SSH keys. The first time you login all this can be done from the landing page.

Procedure 4.5. Signing up using Yahoo

  1. Navigate to Gerrit

    Go to http://saros-build.imp.fu-berlin.de/gerrit and press Sign In.

  2. Select an OpenID Provider

    Select your OpenID provider, e.g. Yahoo, Google, Livejournal, MyOpenID.

  3. Sign into your OpenID Provider

    You will need to sign into your account.

  4. Authorize the usage by Gerrit

    Allow to use your identity by Gerrit.

  5. Configure the Gerrit account

    Your browser will return to our Gerrit and you will need to set your name, pick a user name, add your SSH keys. You should ask your supervisor to add you to the Reviewer group to be allowed to make reviews and submit code.

Concepts and Terminology

Change

Every time you push a commit with a new Change-Id Gerrit allocates a change. The change contains a number of patchsets, comments on the patchsets and ratings in various categories. Each change has a dedicated page that shows information about it. This includes dependencies between different changes, patchsets and the review comments.

Category

A category has a name and a rating scale. This is used to allow Users, Jenkins and other scripts to provide review. Right now we have the Verified, Review and Sanity categories are configured. The rating can range from -2 to +2.

Patchset

A patchset is a git commit that has been pushed to Gerrit. Gerrit uses the Change-Id of the commit meesage to identify the change. Each patchset can receive inline comments.

Submit

Once a change has received a +2 in the Review category and no negative voting in the other categories the last patchset can be submitted. This means Gerrit will now try to merge your patchset and mark the change as merged.

Making a review

Once you have opened the Gerrit page you can move to the list of changes that require review by clicking All. This will show you the list of all changes that require action. Clicking on any of these changes will bring you to the change overview. This page contains information about the change, already received voting, dependencies of the change with other changes and allows you to look at the current patchset and leave inline comments. Once you went through all the touched files you can click the Review button, leave a vote and provide a comment. The easiest way to start the review is by clicking on the Commit Message and then jump to the next file. Inside the Differences view you can modify the display by clicking on the Side-by-Side, Unified Preferences, Patch Sets links.

Procedure 4.6. Making a review

  1. Switch to the All page

    Select the change you want to review

  2. Individual Change page

    Check existing reviews, dependencies and scroll down to the patchsets and start your review by pressing on the Commit Message.

  3. Provide Comments

    Provide inline comments, or go to the Preferences to change the way the patch is displayed.

  4. Finishing the Review

    Press the Up to Change to return to the change page and then the Review to finish your review and leave some final comments and rate the change.

Submitting a change

Once a patchset of a change has been approved the Submit Patchset will appear on the screen. Press the button to try to integrate your patch. The most common reasons that a patchset will not integrate is that a dependency is not integrated yet or the patchset can not be cleanly merged. For the later the following chapter will explain how you can rebase it and re-push it.