Code review is considered complimentary to testing and has been shown to be effective at improving software quality. We use the excellent ReviewBoard code review application.
We'll install ReviewBoard with support LDAP. The source code for this package is available here.
Ensure that you have the fimero package repository configured.
$ sudo apt-get install bbreviewboard
You'll be asked a series of questions e.g. MySQL password or the hostname you'd like to use for your self-signed certificate. The installation will then complete. Once finished, point your browser to
Log in as admin.
Click on the Admin button on the upper right.
Click on Settings.
Click on Authentication.
Enter your settings.
Note that your
cnmust contain a
surnameseparated by a space. This is an issue with the way Reviewboard generates a user and should be considered a bug.
You can now log in via your LDAP username and credentials.
Note that if you're installing ReviewBoard on a machine that hosts Mindtouch, you'll need to update your
There is a good example of ReviewBoard work flow with Mercurial available here.
With additional documentation available here.
You'll need to download the source for the Mercurial integration for ReviewBoard.
$ mkdir -p hgdev/com.googlecode $ cd hgdev/com.googlecode $ hg clone https://code.google.com/p/mercurial-reviewboard/
Now update your Mercurial
$HOME/.hgrc file to include the following:
We had to experiment with several approaches before we came up with a usable workflow for Mercurial. It seems that ReviewBoard was designed for pre-commit reviews although with a little tweaking, a usable Mercurial workflow is possible.
We'll assume your username is
- Create a master repository e.g.
acmeon Bitbucket. This should be under a user that holds the golden copies of your source code. Let's call this user
asmithread access to this repository.
- Create a repository on ReviewBoard that points to this golden repository.
- Clone this repository locally into
hg clone https://firstname.lastname@example.org/kroboto/acme. This serves as your baseline.
asmiththen creates a personal
acmerepo on BitBucket. She then clones the golden
$HOME/hgdev/org.bitbucket/asmith/acme. Finally, she edits
.hg/hgrcto point to her personal
asmithbegins working on her code base committing and push as needed until she is ready for a code review.
- She first does an
hg pull -uon her golden copy. She then pulls her changes from
$HOME/org.bitbucket/kroboto/acmeand performs any necessary merges.
- She submits a code review with
hg postreview tip. This produces a code review id (e.g. 17). She submit subsequent reviews with
hg postreview -l -e 17 tipuntil her code is accepted.
- Her code is then merged with the
Backup And Restore
To backup ReviewBoard, dump the MySQL database. You can automate this process with one of several options for MySQL.