ccollab addfiles

Applies to Collaborator 14.7, last modified on December 18, 2024

Description

The ccollab addfiles command uploads local files to a review on the Collaborator server. Files are uploaded without a "previous revision" so the entire file will be shown without differences.

The command tries to detect if the specified files are managed by the supported source control system (respecting the --scmglobal option). On success, it uploads the files as local SCM changelist, otherwise it uploads them as ordinary files.

Command Line Syntax

ccollab [global-options] addfiles [--relative-to <value>] [--upload-comment <value>] [--separate-changelists] <review> <file-path> [<file-path> ...]

Command Options

Option

Required?

Description

global-options

No

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

--relative-to <value>

No

If specified Collaborator will calculate file-paths relative to this path. Applies when no SCM system was detected.

--upload-comment <value>

No

The comment for the uploaded files (default is "Local changes").

--separate-changelists

No

If specified each file will be uploaded as a separate changelist. Applies when no SCM system was detected.

<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> [<file-path> ...]

Yes

Path to local files to be uploaded to review. If file path contains space characters, enclose it in quotes.

Remarks

  • Files are uploaded without a "previous revision" so the entire file will be shown without differences. If you upload the same file path on more than one occasion, the server will start making diffs of each version against the previous.
  • The server displays the full file system path of the files, unless you specify the --relative-to option.
  • By default, multiple files are uploaded as a single changelist and review participants receive a single notification that lists all the files. If the --separate-changelists option is specified, then each file will be uploaded with its own changelist. This will allow to delete the files individually, but notifications will be sent for each and the uploading will take more time.
  • If you specify a file path that does not exist, an error will occur.
  • If you specify a path to a folder, an error will occur.
  • When used along with Perforce SCM, the command cannot upload arbitrary local files. Only files from Perforce workspace can be uploaded.

Examples

To upload the foo.txt and c:\dev\bar.txt files into a brand new review:

ccollab addfiles new foo.txt c:\dev\bar.txt

To upload the c:\dev\bar.txt file into review #62:

ccollab addfiles 62 c:\dev\bar.txt

To upload the c:\dev\foo\chan.cs file into review #37 and calculate file paths relative to c:\dev\:

ccollab addfiles 37 c:\dev\foo\chan.cs --relative-to c:\dev\

See Also

ccollab
ccollab addchanges
ccollab addchangelist
ccollab addversions
ccollab adddiffs
ccollab commit

Highlight search results