git tutorial eclipsecon france 2014 - gerrit exercise 7 - new changescreen

Download Git Tutorial EclipseCon France 2014 - Gerrit Exercise 7 - new changescreen

Post on 11-Nov-2014




5 download

Embed Size (px)


Git Tutorial EclipseCon France 2014 - Gerrit Exercise


  • 1. New Change Screen In this exercise you will do a code review in Gerrit and use the new Change Screen. The new Change Screen was introduced as optional replacement with Gerrit 2.8 and will replace the old one in 2.9. Preparation Switch on the new Change Screen Open the settings page Open the Preferences, change Change View to New Screen and save Review the source code changes from Gerrit Steps: Look at the list of files. These are the files that were added, modified or deleted within this change.
  • 2. Click on a file name to open a page displaying the changes done in this file. The left side shows the old version and the right side shows the new version of the file. The diff is highlighted: If you want to comment on a source code line type c and type in your comment: You can also select a range in the source code before commenting in order to show the scope of the comment
  • 3. You can also enter comments for the whole file Click Save in order to save the (draft of) your comment NOTE: the comments you create are not yet visible to anybody else but you. Only when you publish your comments they will become visible to everybody. Continue reviewing other files in the same way Review the commit message Providing a good commit message is as important as writing good code. A good commit message should describe why (the motivation) and not what. When months or years later you look at a change in your Git history you will easily see what was changed. However, only if the commit message was good we will know why this change was made. Therefore, Gerrit also provides review of the commit message. It is done the same way as reviewing a file and the commit message appear at the top of the file list:
  • 4. Edit the commit message You can now directly edit the commit message in Gerrit. Click on the Edit Message button and edit the message. Click on save. Gerrit creates a new Patch Set. Navigate between Patch Sets The Patch Set navigation is now available under the drop down named Revisions. Vote and Publish Comments Click on the small arrow on the upper right to go back to the change. Click the Reply button Vote in the Code Review category
  • 5. Vote +1 in the Verified category. If you are running against the Verified vote will be done by a Hudson job which is verifying all changes pushed for review. Write the cover message and click the Send button: You are done with the review! Copyright 2014 by C. Halstrick, E. Kempin, S. Lay, S. Zivkov, M. Sohn