Jump to: navigation, search


Revision as of 09:29, 11 September 2014 by Dp (talk | contribs) (add gertty)

Review Workflow Tips


  • git review - The same tool we use for submitting patches for review has some options that assist with the review process. See the git-review man page for more details.
  • ReviewDay - A dashboard that prioritizes reviews based on blueprint/bug priority and automated test results
  • next-review - A command line to help you choose the next review to do, primarily based on its age while automatically skipping what you have already reviewed. The tool can also dump a list sorted by its logic, which is helpful if you want to choose from a sorted list.
  • Important Changes - A prioritized list of reviews built in to gerrit.
  • Emacs Gerrit Download - An Emacs mode to download and show reviews.
  • Gerrit View - Command line tools for querying and watching gerrit
  • reviewtodo - A review to-do list generator to help you figure out which reviews you need to follow up on.
  • GerryMander - A gerrit client API and command line tool for producing & displaying arbitrary reports. Use this config file with OpenStack
  • Gertty - A console-based interface to the Gerrit Code Review system.

Gerrit Queries

You can create a query that shows you the reviews across multiple projects and branches at the same time. For example:


More useful queries: http://lists.openstack.org/pipermail/openstack-dev/2013-September/015705.html

Querying with qgerrit

The qgerrit tool is a command line utility distributed with the "Gerrit View" package that facilitates the querying of gerrit to determine candidates for review.

Tailoring the list of reviews to projects and files

When invoked with no arguments it will report all pending reviews across all projects. A first step in reducing the amount displayed is to filter based on the project

$ qgerrit --project openstack/nova

For a project like Nova, this will still produce a very long list. It can thus be helpful to look at specific areas of the code tree. The qgerrit tool accepts a list of positional arguments, which are used to match against filenames in the reviews. So to filter the list of reviews to only those which touch a file with "libvirt" in the name

$ qgerrit --project openstack/nova libvirt

The arguments are actually regular expressions, not merely substrings, so it is possible to get inventive to look just as libvirt test files

$ qgerrit --project openstack/nova tests/.*libvirt

Identifying changes needing review

To identify changes that haven't had any negative review feedback, qgerrit can be told to only show changes with a code review score of 0 or better

$ qgerrit --project openstack/nova -a c0

Identifying changes for approval

To further identify changes that are ready to be approved, qgerrit can be told to filter based on the code review score where there is no negative karma and at least one +2

$ qgerrit --project openstack/nova -a c2

Identifying changes you have not reviewed

To identify changes where you have not personally commented on the latest patch series

$ qgerrit --project openstack/nova -w ^berrange

Customizing the data display

The list of columns displayed by the qgerrit tool can be customized using the '-f' argument. For example to display the URL, branch, owner, truncated subject line, update/creation dates and approval score only, sorting by creation date

$ qgerrit \
  -f url -f branch -f owner -f subject:80 
  -f lastUpdated -f createdOn \
  -f approvals --sort createdOn 

Other Tips