Description
The ccollab addversions
command appends the specified versions (revisions) of a file controlled by the PTC Integrity client (PTC Source) on your computer 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 PTC-specific global options. See Command-line Global Options Reference. |
||
No |
A comment to be used for the uploaded files. Default is Local changes. |
|||
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). |
|||
Yes |
Identifier of the desired review (an integer number), or a
|
|||
No |
The path of the file whose versions are to be added to the review. If filename is omitted, entire directory will be added.
|
|||
No |
Required, if <file-path> is specified. The version (revision) of the file to be added to the review. You can specify the local keyword to tell the command to use the local version of the file. |
|||
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 PTC Integrity source control. |
Examples
The following command line adds versions (revisions) 1.95 and 1.88 of the hello.c file to the review 861:
ccollab addversions 861 ./hello.c 1.95 1.88
The following command adds these revisions to a new review:
ccollab addversions new ./hello.c 1.95 1.88
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
PTC Integrity Integration
ccollab addversions
ccollab addchangelist (for PTC Integrity)
ccollab addchanges (for PTC Integrity)