Add a changelist to a review

Once a review has been started you can add a changelist to the review. It can be useful to add changelists to an existing review. For example, if follow up changes are made to files in a review or if you need to group a number of changelists under a single review.

The Add Change button in the review heading is used to add a changelist to an existing review. The button is not visible if the review is in a state that is protected from change by the review workflow rules. For details of the On update of a review in an end state rule, see Workflow rules.

 

Image of the Add Change button

The options available in the Add Change dropdown menu depend on whether the review is pre-commit or post-commit:

Tip

When the content of a review is changed, Swarm checks to see which branches are in the new revision of the review:

Append a pending changelist to a review

The Append Pending Changelist option is used to add a pending changelist to a pre-commit review.

Example:

Important

Committing a review with Swarm (recommended): Swarm automatically commits the files in the approved revision of the review.

Committing a review outside of Swarm:

Before you commit the review:

  1. Unshelve the review into the pending changelist associated with the review.
  2. Reshelve the files in the pending changelist.
  3. Commit the pending changelist.
  4. This process ensures that all of the files in the approved revision of the review are committed.
  5. Workflow technology preview feature disabled (default):

    Swarm can be configured to automatically check that the files being committed match the files in the approved revision of the review, see the strict trigger option.

    Workflow technology preview feature enabled:

    Swarm can be configured to automatically check that the files being committed match the files in the approved revision of the review by using the On commit with a review workflow rule. For information about the On commit with a review rule, see Workflow rules.

To append a changelist to a review:

  1. Click Add Change from the review heading.
  2. Select Append Pending Changelist from the dropdown menu and the append review dialog is displayed with a list of recent pending changelists:
  3. Append Review dialog image

  4. Enter the pending changelist number directly in the @ Change box, filter by depot path and user, or select a changelist from the list of recent changelists.
  5. Note

    The changelist must not be part of another review, if it is Swarm will reject it.

  6. Click Select to append the changelist to the review, double-click a changelist to do the same.
  7. The changelist is appended to the review and the review version is updated.

Replace review with a pending changelist

The Replace with a Pending Changelist option is used to replace the files in a review with the files in a pending changelist.

Note

If you replace a post-commit review with a pending changelist, the new version of the review will be a pre-commit review.

Example:

Tip

When you replace a review with a changelist, the base versions of the files in the new revision of the review are the base versions of the files in the replacement changelist.

To replace the files in a review with the files in a changelist:

  1. Click Add Change from the review heading.
  2. Select Replace with a Pending Changelistfrom the dropdown menu and the replace review dialog is displayed with a list of recent pending changelists:
  3. Image of the Replace Review with a Pending Changelist dialog

  4. Enter the pending changelist number directly in the @ Change box, filter by depot path and user, or select a changelist from the list of recent changelists.
  5. Note

    The changelist must not be part of another review, if it is Swarm will reject it.

  6. Click Select to replace the review with the changelist, double-click a changelist to do the same.
  7. The changelist files replace the files in the review and the review version is updated.

Replace review with a committed changelist

The Replace with a Committed Changelist option is used to replace the files in a review with the files in a committed changelist.

Note

If you replace a pre-commit review with a committed changelist, the new version of the review will be a post-commit review.

Example:

Tip

When you replace a review with a changelist, the base versions of the files in the new revision of the review are the base versions of the files in the replacement changelist.

To replace the files in a review with the files in a changelist:

  1. Click Add Change from the review heading.
  2. Select Replace with a Committed Changelist from the dropdown menu and the replace review dialog is displayed with a list of recent committed changelists:
  3. Replace Review dialog image

  4. Enter the committed changelist number directly in the @ Change box, filter by depot path and user, or select a changelist from the list of recent changelists.
  5. Note

    The changelist must not be part of another review, if it is Swarm will reject it.

  6. Click Select to replace the review with the changelist, double-click a changelist to do the same.
  7. The changelist files replace the files in the review and the review version is updated.