TortoiseHg Review Board dialog ported to PyQt for Thg 2.0

06 Nov

Over the last couple of weeks I have spent a lot of time porting the Review Board dialog I wrote for TortoiseHg to use the PyQt framework and the upcoming release of TortoiseHg 2.0.

Review Board is a powerful tool to increase the quality of code in any organisation. The Review Board Mercurial extension was an excellent way to submit diffs to the review board server directly from the command line. This dialog takes this simplicity to the next level by providing a way to post reviews directly from TortoiseHg. It is is available now in the current beta release of TortoiseHg 2.0.

It requires a slightly modified version of the Review Board Mercurial extension that can be downloaded here –

To use the dialog in TortoiseHg 2.0 you need to activate the above Review Board mercurial extension in the global mercurial settings file. Once activated, the Review Board dialog and menu items will be available in TortoiseHg 2.0.

You can set the Review Board extension settings in the TortoiseHg settings dialog under the Review Board tab. The Review Board server, username and password is required because the dialog will download a list of repositories and existing review requests from the server.

Once the settings are correct you are now ready to post a review to the Review Board server. To do so the user will need to select an outgoing change set or set of outgoing change sets from the TortoiseHg Workbench and click the right mouse button to bring up the context menu. From here you can select Post to Review Board that will open the Review Board dialog.

Within this dialog the user can set up the review that they are posting to the Review Board server. The user can choose to post a new review or update an existing review in addition to a list of the change sets that the user originally selected.

If the ‘outgoing’ option is not checked the review will contain the change sets between and equal to the top and bottom checked change set. For example if there are 5 change sets in the list and the first and last is not checked then the review will include change sets 2, 3 and 4 regardless if change set 3 is checked or not.

The Post and Update Review tabs have a set of fields and options dependant on the task chosen. In addition to these specialised options there are two options that relate to both that can be set.

1. Create diff with all outgoing change sets on this branch – This option will grey out the change sets box. The review will ignore what the user originally selected and will include all outgoing changes under this selected change set in the change sets list.
2. Publish immediately – This one is self explanatory, the review will not be posted as a draft.

Within the “Post Review” tab the user has two fields to complete/select.

1. Repository ID – A list of repository id’s that have been set up on the Review Board server
2. Summary – The summary of the review request that is being posted to Review Board. If this field is left blank then the summary will be set to the commit message of the first change set in the list

Within the “Update Review” tab the user has two fields to select.

1. Review ID – The review that the user wishes to update
2. Update fields of this existing request – The updated review will overwrite the current description in the existing review

Finally, once the user is happy with the options selected they can hit the Post Review button and the diff will be bundled up and posted to the Review Board server.

The review description will contain a list of the change sets posted and their commit messages.


Tags: , , , , ,

  1. Ahmed

    July 9, 2015 at 8:03 am

    Very nice plugin, I have been using it for a while now. However, it is broken with TortoiseHG 2.1.1

    • Mikey

      July 12, 2015 at 10:34 am

      Gday Ahmed,

      I have not had a chance to test it with 2.1.1. But according to Steves reply to that bug the Mercurial plugin has not been updated.

      I will have a look when I get a chance.


  2. TortoiseHg review board interface now uses a fork of the original extension « Mikey D

    December 29, 2014 at 4:08 am

    [...] features used by my┬ácolleges. I have since made some changes to the UI I wrote earlier this year ( to make use of a fork of the original extension rather than Mdelagra’s [...]

  3. Ashith

    December 15, 2014 at 8:45 am

    Does this extension work well with http mercurial repos?

    Here is what we follow in our workplace,
    We have a central repo hosted on IIS.
    We have the dev team cloning this central repo and pushing in to the central repo.

    I have setup reviewboard and added a mercurial repo using the admin dashboard of reviewboard.

    Posting reviews work fine if I add a new file to the repo.
    Whenever I modify a file and try to post a review for this modified file, I get a “File not found in upstream repo (207)” error.

    I am not sure if I am doing anything wrong. Does reviewboard work fine with Mercurial repos hosted using hgwebdir.cgi et al?

    • Mikey

      December 17, 2014 at 4:33 am

      Gday Ashith,

      I have had it working with http repos no worries at all. There are a few bugs in the reviewboard extension that need to be ironed out.

      Does the repo the you are selecting in the post review dialog match what is on your server?
      Can you post from the command line without the ‘-o’ option?