This page last changed on Feb 17, 2010 by edawson.

This page includes instructions on uploading patch files from your repository, how to load them into Crucible to be reviewed and use Crucible's Patch Anchoring to retrieve more lines of context from the original file.

Crucible allows you to review a change before it has been committed. To do this, you upload a patch file to the 'Patch' tab (or paste it in as text) when creating a review. You must first generate this patch file from your repository, using either commands built into your IDE, or via the repository command-line tools.

By default, patch files will only show a few lines of code surrounding each change, rather than the entire file and its changes. Crucible's patch anchoring feature overcomes this limitation.

Using Crucible Patch Anchoring to Automatically Add Full Context

Crucible's Patch Anchoring feature allows you to add a regular patch to a review (showing only a few lines of context. Then, Crucible will automatically search for the relevant file content in the connected repositories. When it finds the files, it will seamlessly add in more context from the file so that you can view all of the lines of code (greatly enhancing the review process).

To use patch anchoring:

  1. Create a new review. From the 'Tools' menu in Crucible, select 'Create Review'.
  2. Click 'Pre-Commit - Upload a patch file to be reviewed'. The 'patch upload' dialog appears. Click 'Browse', locate your file, then click 'Upload'. Crucible will now search for matches in the files in its database. Crucible will find the closest match and anchor it to your patch, as shown below:

    Screenshot: Crucible Patch Anchoring


  3. You can click 'Edit' to change the anchoring, by choosing a new match or removing the anchor. You can change the anchoring later, after the review is live.
  4. Start the review. When viewing the diffs, you will be able to choose more than three lines of context from the 'View' menu.



Screenshot: Editing Patch Anchoring Settings



Screenshot: Viewing more than three lines with Patch Anchoring


Document generated by Confluence on Feb 23, 2010 02:04