ccollab admin trigger ensure-content-reviewed

Top  Previous  Next

Usage: ccollab [global-options] admin trigger ensure-content-reviewed [--ignore-integrate --no-keywords --review-id-regex <value>] <changelist-id>

 

ensure-content-reviewed - Changelist cannot be submitted until review completed & file list/content is unchanged

 

Command Options

Option

Required?

Description

--ignore-integrate

N

Allow integration changes to proceed without review

--no-keywords

N

Disallow keyword expansion

--review-id-regex <value>

N

Regular Expression that identifies Review ID in commit comment

<changelist-id>

Y

Changelist ID

 

This trigger ensures that a Review has been completed and the file list and file content is unchanged before changes can be submitted to version control.

If a Review has not been completed, or the Review contains different files or file contents, the submit will fail and the user will get an error message explaining that the changes need to be reviewed before submit.

 

For Perforce, to install this trigger edit your Perforce Triggers list (see Perforce manual for details) and add a line like the following (except supply your installation directory for the ccollab application, replace <values> as appropriate, and put everything on one line even though the following text is word-wrapping):

 

ccollab content //depot/... "/usr/bin/ccollab --url <collabUrl> --user <collabUser> --password <collabPasswd> --scm perforce --p4port <p4port> --p4user <p4user> --p4passwd <p4passwd> admin trigger ensure-content-reviewed %changelist%"

 

On Unix systems the Perforce trigger system incorrectly splits up arguments by whitespace ignoring single quotes and other standard ways of indicating that data with spaces is actually a single argument. The solution is to use a separate bash script to call our trigger application.

 

For Perforce, you must supply credentials for a Perforce user that has at least read-only access.

 

For Perforce, changelists that result from creating a new branch are ignored. Creating a new branch does not involve a code change, so it does not require review.

 

For Perforce, integrating changes from one branch into another branch does make code changes and can introduce bugs, so by default this type of change is handled by the trigger. However, because integration changes frequently involve a very large number of files and because often it is necessary to integrate changes to many branches, this would require cumbersome reviews to be performed many times.

For this reason, the '--ignore-integrate' option can be used to ignore changelists consisting of only integration changes. In this case, enforcement of code review happens externally to the system: for example, a review could be performed on one branch, but other branches could be just directly integrated.