ccollab addversions

Applies to Collaborator 13.5, last modified on December 21, 2021

Description

The ccollab addversions command appends the specified versions (revisions) of a file controlled by an SCM system to a review.

Command Line Syntax

ccollab [global-options] addversions [--upload-comment <value>] [--version-spec <value> [<value> ...]] <review> [<file-path>] [<version>] [<predecessor-version>]

Command Options

Option

Required?

Description

[global-options]

No

A number of global or SCM-specific global options. See Command-line Global Options Reference.

--upload-comment <value>

No

A comment to be used for the uploaded files. Default is Local changes.

--version-spec <value> [<value> ...]

No

The version to be added to a review. A version-spec value consist of three components:

pathversion [previous-version],

where path is the file name or server path of the file, version is the file version to be reviewed, and previous-version is an optional version, against which version should be compared.

If any of these arguments contains spaces, enclose it in quotes.

Typically a version-spec is not used in the command line. We recommend specifying the file and version using the <file-path>, <version> and the <predecessor-version> arguments (see below).

<review>

Yes

Identifier of the desired review (an integer number), or a new, ask, or last keyword. Where keywords define the following behaviour:

  • new - the command will create a new review,
  • ask - the command will pause execution and prompt for the identifier of the desired review,
  • last - the command will use the last review that was created on the current machine via Command-Line Client (that is, it does not know about reviews created elsewhere).

<file-path>

No

The path of the file whose versions are to be added to the review. If filename is omitted, entire directory will be added.

If you use this option, you should also specify <version> (see below).

<version>

No

Required, if <file-path> is specified.

The version (revision) of the file to be added to the review. You can specify the keyword local to tell the command to use the local version of the file.

<predecessor-version>

No

Preceding file version to be added to the review. If you skip this argument, Collaborator will attempt to determine the preceding version based on the information from the source control.

(See Version Control specific description - ClearCasePTC IntegrityPerforce and Rational Synergy)

Remarks

  • If you skip the predecessor version, Collaborator will generate diffs using the predecessor version reported by your source control system.
  • By default, the command lets you add versions of one file only. To add versions of multiple files, create a text file and specify this file in the command line as the standard input stream (stdin):

    ccollab addversions last < versionlist.txt

    Each line in the file must consist of the following components: pathversion [predecessor-version].

    For information on them, see description of the version-spec arguments.

  • If you skip the file name and versions in the command line, the command will expect to read them from the standard input stream (stdin). Below are some examples for reading versions from the standard input:

    ccollab addversions 86753

    ccollab addversions last < versionlist.txt

    cat versionlist.txt | ccollab addversions new

  • When specifying the version in the command line or in an input file, you can use the local keyword to denote the version corresponding to the local version of the file. The local keyword can only be used for the first version argument, not for the predecessor version.

See Also

ccollab
ccollab addchanges
ccollab addchangelist
ccollab adddiffs
ccollab addfiles
ccollab commit

Highlight search results