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.
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
Navigate to Gerrit
Go to http://saros-build.imp.fu-berlin.de/gerrit and press Sign In.
Select an OpenID Provider
Select your OpenID provider, e.g. Yahoo, Google, Livejournal, MyOpenID.
Sign into your OpenID Provider
You will need to sign into your account.
Authorize the usage by Gerrit
Allow to use your identity by Gerrit.
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.
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.
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.
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.
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.
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 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
Switch to the All page
Select the change you want to review
Individual Change page
Check existing reviews, dependencies and scroll down to the patchsets and start your review by pressing on the Commit Message.
Provide Comments
Provide inline comments, or go to the Preferences to change the way the patch is displayed.
Finishing the Review
Press the Up to Change to return to the change page and then the to finish your review and leave some final comments and rate the change.
Once a patchset of a change has been approved the
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.