Splinter Patch Review

Splinter is an add-on for Bugzilla to allow conveniently reviewing patches that people have attached to Bugzilla. More information about Splinter.

The patch review view

If you get to Splinter by clicking on a link next to an attachment in Bugzilla, you are presented with the patch review view. This view has a number of different pages that can be switched between with the links at the top of the screen. The first page is the Overview page, the other pages correspond to individual files changed by the review.

On the Overview page, from top to bottom are shown:

  • Introductory text to the patch. For a patch that was created using 'git format-patch' this will be the Git commit message.
  • Controls for creating a new review
  • Previous reviews that other people have written.

The pages for each file show a two-column view of the changes. The left column is the previous contents of the file, the right column is the new contents of the file. (If the file is an entirely new file or an entirely deleted file, only one column will be shown.) Red indicates lines that have been removed, green lines that have been added, and blue lines that were modified.

If people have previously made comments on individual lines of the patch, they will show up both summarized on the Overview page and also inline when looking at the files of the patch.

Reviewing an existing patch

There are three components to a review:

  • An overall comment. The text area on the first page allows you to enter your overall thoughts on the bug.
  • Detailed comments on changes within the files. To comment on a line in a patch, double click on it, and a text area will open beneath that comment. When you are done, click the Save button to save your comment or the Cancel button to throw your comment away. You can double-click on a saved comment to start editing it again and make further changes.
  • A change to the attachment status. (This is specific to Bugzilla instances that have attachment status, which is a non-upstream patch. It's somewhat similar to attachment flags, which splinter doesn't currently support displaying or changing.) This allows you to mark a patch as read to commit or needing additional work. This is done by changing the drop-down next to the Publish button.

Once you are done writing your review, go back to Overview page and click the "Publish" button to submit it as a comment on the bug. The comment will have a link back to the review page so that people can see your comments with the full context.

Saved drafts

Whenever you start making changes, a draft is automatically saved. If you come back to the patch review page for the same attachment, that draft will automatically be resumed. Drafts are not visible to anybody else until published.

Note that saving drafts requires the your browser to have support for the "DOM Storage" standard. At time of writing, this is available only in a few very recent browsers, like Firefox 3.5. Strict privacy protections like disabling cookies may also disable DOM Storage, since it provides another mechanism for sites to track information about their users.

Responding to someone's review

A response is treated just like any other review and created the same way. A couple of features are helpful when responding: you can double-click on an inline comment to respond to it. And on the overview page, when you click on a detailed comment, you are taken directly to the original location of the comment.

Uploading patches for review

Splinter doesn't really care how patches are provided to Bugzilla, as long as they are well-formatted patches. If you are using Git for version control, you can either format changes as patches using 'git format-patch and attach them manually to the bug, or you can use git-bz. git-bz is highly recommended; it automates most of the steps that Splinter can't handle: it files new bugs, attaches updated attachments to existing bugs, and closes bugs when you push the corresponding git commits to your central repository.

The bug review view

Splinter also has a view where it shows all patches attached to the bug with their status and links to review them. You are taken to this page after publishing a review. You can also get to this page with the bug link in the upper-right corner of the patch review view.

Your reviews

Splinter can also show you a list of all your draft and published reviews. Access this page with the "Your reviews" link at the bottom of the bug review view. In-progress drafts are shown in bold.