This page last changed on Nov 04, 2009 by smaddox.

Once you have set up your Crucible server as an Eclipse task repository, you can create a pre-commit Crucible review from within Eclipse. This allows you to ask your team members to review your code before you commit it to the repository. The review gathers your local working copies of the files. You and your reviewers can then open the changed files for comment in Eclipse, even though the files have not been committed to the source repository.

Currently the connector supports pre-commit reviews with Subclipse and Subversive only. You cannot yet do pre-commit reviews using CVS.

On this page:

Creating a Pre-Commit Review

The easiest way to create a pre-commit review is from the 'Team' option in the context menu that appears when you right-click an explorer or editor window. Alternatively, you can create a pre-commit review from your task repository. Both methods are shown below.

To create a pre-commit review from a context menu,

  1. Right-click a line in the Package Explorer or Eclipse Editor window, for example. Then select 'Team' and 'Create Pre-commit Review', as shown in screenshot 1 below.
  2. Select your Crucible repository if prompted.
  3. Select the changed files from your workspace, as shown in screenshot 2 below.
  4. Enter the review title and other details as shown in screenshot 3 below, then click 'Finish'


Screenshot 1: Creating a pre-commit review from a context menu




Screenshot 2: Selecting the changes for review




Screenshot 3: Entering the review details

To create a pre-commit review from your task repository,

  1. If you have not already set up a task repository for your Crucible server, please do so by following the steps in the configuration guide.
  2. Open your Eclipse 'Task Repositories' view and find the task repository that you defined for your Crucible server:
    • In the Eclipse toolbar, select 'Window', 'Show View', 'Other'.
    • The 'Show View' popup window appears. Open the 'Tasks' folder and click 'Task Repositories'.
    • The 'Task Repositories' view appears, as shown in screenshot 4 below. (If you have trouble finding the 'Task Repositories' view, try the full instructions with screenshots.)
  3. Right-click the task repository that you defined for your Crucible server and select 'New Task'.
  4. The 'New Crucible Review' window appears, as shown in screenshot 5 below. Select 'From Workspace Changes' and click 'Next'.
  5. The 'New Crucible Review' window now prompts you to add your workspace changes to the review, as shown in screenshot 6 below. Select the files that you want your colleagues to review and click 'Next'.
    Hint: Right-click on the list of changes to select or deselect all.
  6. The 'New Crucible Review' window now prompts you for the review title and other details, as shown in screenshot 7 below. Enter the details and click 'Finish'.


Screenshot 4: Adding a review as a task in your Crucible repository




Screenshot 5: Selecting the review type




Screenshot 6: Selecting the files to be reviewed




Screenshot 7: Adding the review details



Performing a Pre-Commit Review

If you are invited to take part in a pre-commit review, you will open the review in Eclipse as described in Viewing a Review in Eclipse. The pre-commit review will look something like this:


Diagram: Viewing the pre-commit review details

The Crucible review details screen opens in an Eclipse editor. It displays the following:

  • The review summary, state, date of opening and statement of objectives.
  • The participants in the review, i.e. the author, moderator and reviewers.
  • General comments — the comments at review level.
  • The files included in the review, and the general comments at file level for each file.
  • Comments at line level within the file.
  • Further options to:
    • Open the review in your browser, displaying Crucible's web interface.
    • Manage comments at review and file level: Add, reply to, edit and remove comments.
    • Open the old (previous) version of the file under review, showing the file contents before the updates were made.
    • Open the new (updated) version of the file under review.
    • Open a diff view of the file, comparing the old and new versions. See Working on a Review in the Diff View in Eclipse.
    • Perform the workflow actions that are relevant to the review's current state, such as summarise and close the review or abandon the review.
    • Add reviewers to and remove reviewers from the review. See Assigning Reviewers in Eclipse.
    • Add changesets or a patch to the review. See Adding Changesets or Patches to Review in Eclipse.

Next, take a look at assigning reviewers.

RELATED TOPICS

Working with Crucible Reviews in Eclipse

Refer to the Crucible documentation for more information about Crucible reviews.


Document generated by Confluence on Nov 05, 2009 21:57