Open topic with navigation
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 options available in the Add Change dropdown menu depend on whether the review is pre-commit or post-commit:
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:
- Original review contains the following files: A#1, B#2, C#1, D#1, and E#4
- Changelist contains the following files: A#2, C#3, E#4 (marked for delete), and F#1
- Appending the changelist to the original review generates a new revision of the review that contains the following files: A#2, B#2, C#3, D#1, E#4 (marked for delete), and F#1
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:
- Unshelve the review into the pending changelist associated with the review.
- Reshelve the files in the pending changelist.
- Commit the pending changelist.
- This process ensures that all of the files in the approved revision of the review are committed.
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.
To append a changelist to a review:
- Click Add Change from the review heading.
- Select Append Pending Changelist from the dropdown menu and the append review dialog is displayed with a list of recent pending changelists:
- 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.
Note
The changelist must not be part of another review, if it is Swarm will reject it.
- Click Select to append the changelist to the review, double-click a changelist to do the same.
- 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:
- Original review contains the following files: A#1, B#2, C#1, D#1, and E#4
- Changelist contains the following files: A#2, C#3, E#4 (marked for delete), and F#1
- Replacing the original review with the changelist generates a new revision of the review that contains the following files: A#2, C#3, E#4 (marked for delete), and F#1
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:
- Click Add Change from the review heading.
- Select Replace with a Pending Changelistfrom the dropdown menu and the replace review dialog is displayed with a list of recent pending changelists:
- 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.
Note
The changelist must not be part of another review, if it is Swarm will reject it.
- Click Select to replace the review with the changelist, double-click a changelist to do the same.
- 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:
- Original review contains the following files: A#1, B#2, C#1, D#1, and E#4
- Changelist contains the following files: A#2, C#3, E#4 (marked for delete), and F#1
- Replacing the original review with the changelist generates a new revision of the review that contains the following files: A#2, C#3, E#4 (marked for delete), and F#1
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:
- Click Add Change from the review heading.
- Select Replace with a Committed Changelist from the dropdown menu and the replace review dialog is displayed with a list of recent committed changelists:
- 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.
Note
The changelist must not be part of another review, if it is Swarm will reject it.
- Click Select to replace the review with the changelist, double-click a changelist to do the same.
- The changelist files replace the files in the review and the review version is updated.