Version 10 (modified by Cinc-th, 6 years ago) (diff)

Added instructions for review search mainly taken from included with the plugin.

Distributed Peer Review - User Guide


Distributed Peer Review system is a plugin for Trac that facilitates distributed peer review of code. Normally peer review happens in a central location with paper copies of code, or works in an disorganized fashion involving email or other electronic means to communicate. However, these systems are inefficient for multiple code reviews, and can become unmanageable very quickly. Hence, this system assists developers in managing and performing code reviews in a distributed way.


Distributed peer review facilitates code review without the need for all team members to meet together, saving time. In addition, changes proposed under a distributed system are easier to implement. Our project seeks to create a distributed peer review system by creating a plugin for Trac, which is a browser-based content management system that includes bug-tracking. The plugin integrates with Subversion, a popular open-source version control system.

Trac supports plugin development with Python on the backend, and ClearSilver, a fast and powerful HTML template system, on the front-end. Javascript and AJAX were used to provide pages with dynamic features. An SQLite database is utilized to store all information about reviews and users.

Note: Since version 2.1 this plugin uses the new template engine Genshi, and supports SQLite, PostgreSQL and MySQL as database backends.


Main Page

The main page is displayed when the Peer Review button on the navigation bar is clicked.

The first table is the list of code reviews where you are the author. Clicking on any element in a particular row will take you to the View Code Review page for that row. Also, this table displays the code review ID, code review name, current status of the review, and the date that the review was opened.

My code reviews list

The second table is the list of code reviews where you are the reviewer. Clicking on any element in a particular row will redirect to the View Code Review page for that row. Also, this table displays the code review ID, code review author, review name, your voting status for the review, and the date that the review was opened.

Assigned code reviews

Managers will see an additional table at the top of the page above the two tables that are typically there for a developer. These are the code reviews that need to be reviewed by a manager. After approval by a manager, the manager should add the changes in the code review to the development trunk.

Code reviews awaiting approval

Finally, just below the navigation bar in the upper right corner are some navigation links for moving through the plugin. The links will take you to the Main Page, New Code Review Page, and Search Code Review Page, respectively.

New Code Review

A new code review is created by the following steps:

  1. Choose a name
  2. Select files and section to be reviewed
  3. Add reviewers
  4. Provide additional notes and instructions

Choose a name

This will be the name that will appear on the main page after the code review is created. A name cannot be longer than fifty characters in length.

New screenshot for review name

Add files

The user is presented with the Subversion repository tied to TRAC.

Navigation through this repository is identical to navigation through the TRAC repository. Clicking on folders navigates through the folder. Clicking on files will open that file if an HTML preview is available. To navigate back up, click on the corresponding folder above the repository (for example, where it says "root").

Screenshot update

Once a file has been opened, the repository browser will look similar to this:

Screenshot update for file preview in browser

In order to select a file to be added into the peer review, click the corresponding lines of code on the left that you would like to add. For example, here the user clicked on 82 and clicked on 87 to select lines 82-87. Alternately, the user could type those numbers into the corresponding text boxes below the repository browser.

Once the correct lines of code have been selected, click "Add File" to add the code to the code review. The location will appear in the table below the repository browser, along with the line numbers and revision number.

Add reviewers

Select reviewers from the dropdown list and click "Add user" to add them to the table of reviewers. This is the list of people that will vote on whether or not the code for the current code review is acceptable. Reviewers may be removed by clicking their names in the reviewers table.

Only users with permission CODE_REVIEW_DEV will be shown in the dropdown list.

New screenshot for user selection

Provide notes and instructions

General comments can be added to the code review. These comments can be seen by anyone viewing the code review.

New screenshot for author notes

After adding general comments, the user is ready to add the code review. Click "Add Code Review" at the bottom of the page to do this. The user will be taken to the View Code Review page for this code review.

Peer Review Search

This page helps search for code reviews, given relevant information to find the correct code reviews. First, search constraints are selected, and then a search is performed by clicking on the search button. When search constraints are selected and a search is performed, code reviews that still satisfy the constraints are listed. If no constraints are given, all reviews, both active and inactive (closed), are listed. Combinations of fields narrow the search results. For example, searching for reviews after one month ago and by a certain author will likely return less results than searching by one of the constraints alone. It is possible to constrain the search such that no results are returned. Such a condition is indicated after searching.

Specify search criteria

To find a particular code review name or code review names that contain certain characters, enter it in the "Code Review Name" field. Further, to find reviews after a certain date, enter the date in the second set of input boxes. Likewise, to constrain the returned results of the search to a certain status, change the "Status" field. Finally, to find all code reviews matching a certain author, fill in the final field. After specifying the constraints for the search, click on the "Search" button.

Search results

As seen above, the results include information on the review ID, author name, current status, and review name. For each review listed, links are given to jump directly to the view code review page for the review. Alternately, the constraints can be increased or relaxed by choosing different values for the fields and searching again.

Perform Code Review

To be written.

View Code Review

To be written.

Manager Options

To be written.

Manager Options

To be written.


To be written.


This plugin is licensed under the BSD license.

Attachments (27)

Download all attachments as: .zip