Start a code review
If your Helix Core Server is configured as a commit-edge deployment, and your normal connection is to an edge server, Swarm refuses to start reviews for shelved changes that have not been promoted to the commit server.
Within Swarm, this means that the Request Review button does not appear for unpromoted shelved changes. Outside of Swarm, attempts to start reviews for unpromoted shelved changelists appear to do nothing. Ask your Helix Core Server administrator for assistance if you cannot start a review.
An administrator of the Helix Core Server can automatically promote shelved changes to the commit server by setting the configurable dm.shelve.promote
to 1
.
If your changelist only contains a stream spec and its location in the Helix Core Server is not associated with a Swarm project, the review that you create will not have any default reviewers or workflow rules. To associate the review with a project so that it has default reviewers and obeys the project workflow rules, include a file change from the project path in the changelist when you create the review.
- Use the Helix Core command-line (P4) or a client to create the shelved or committed changelist.
- Start a code review by using one of the following approaches:
Use Swarm:
- Use Swarm to view a shelved or submitted changelist.
- Click the Request Review button to request a review of that changelist.
To view a shelved or submitted changelist, use a Quick URL. For example, if your change is 54321, visit the URL: https://myswarm.url/54321
.
Requesting a review on a shelved changelist uses the pre-commit model and requesting a review on a submitted changelist uses the post-commit model.
Use Helix Core command-line (P4):
When you are about to shelve or submit files:
-
Include
#review
within your changelist (separated from other text with whitespace, or on a separate line).Once the review begins, Swarm replaces
#review
with#review-12345
, where12345
is the review's identifier.NoteThe
#review
keyword is customizable. For details, see Review keyword. - At this time, you can add reviewers to the code review by using @mention for users, and @@mention for groups in the changelist description for each desired reviewer.
- Complete your shelve or submit operation.
If your @mention
or @@mention
includes an asterisk (*
) before the userid or groupid, for example @*userid
, that user or all of the group members become required reviewers. If your @@mention
includes an exclamation mark (!
) before the groupid, for example @@!groupid
, the members of that group become required reviewers but only one member of the group is required to vote. See Required reviewers for details.
If you shelve a changelist and subsequently edit the description to include #review
, a review is not started. You must re-shelve the files after adding #review
.
You can also start a Swarm review with P4V, P4VS, and P4Eclipse. See below for details:
- P4V: see the Swarm integration features section of the Helix Core Visual Client (P4V) Guide.
- P4VS: see the Managing files chapter of the P4VS User Guide.
- P4Eclipse: see the Reviewing changes chapter of the P4Eclipse User Guide.
If you are using P4V and its Swarm integration, and you encounter the error Host requires authentication
, ask your Helix Core Server administrator for assistance. See P4V Authentication for details.
Once a review has started
Wait for someone else to review your code, or see Contribute comments or code changes to a code review More review activities are available.