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 – https://bitbucket.org/michaeldewildt/mercurial-reviewboard.
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.










