ccollab addversions (for ClearCase)

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 ClearCase 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 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.

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.

Examples

Some examples of specifying versions on the command line for ClearCase:

ccollab addversions new ./hello.c /main/mydev/6 /main/8

ccollab addversions last ./Main.java /main/dev/31

To compare the local version of the ClearCase file/directory to a previous version in an edit list or input list, use local as the initial version. If the file/directory is checked out as "/main/CHECKEDOUT", then local is equivalent to using /main/CHECKEDOUT as the initial version. Otherwise local would refer to the latest version of the file/directory. For example, if the local file ./hello.c is at version "/main/9" and has predecessor "/main/8", then all of the following lines would be equivalent:

./hello.c /main/9

./hello.c local

./hello.c /main/9 /main/8

./hello.c local /main/8

You can also reference a LATEST version, for example:

ccollab addversions new ./hello.c /main/ga_1.0/6 /main/LATEST

To upload a version with no predecessor version, use /main/0:

ccollab addversions new ./hello.c /main/ga_1.0/6 /main/0

To compare the version "/main/2" of the directory "W:/user_name_ccrctut_pvob/server" to the version "/main/3" , please run the following command and the difference will be uploaded to Collaborator.

ccollab addversions new W:/user_name_ccrctut_pvob/server /main/2 /main/3

See Also

ClearCase Integration
ccollab addversions
ccollab addactivity
ccollab addchangelist (for ClearCase)
ccollab addchanges (for ClearCase)
ccollab commit (for ClearCase)

Highlight search results