Show TOC

ADDLocate this document in the navigation structure

Use

Adding new resources to the DTR in order to put them under version control.

Prerequisites

You have created new versioned objects (files and folders); create these objects in the local file system in a folder exposed under a workspace.

  • Use the add command to add the new objects to an activity.

  • To check in this activity, use the checkin command.

Syntax

Syntax

ADD <-a activityName> [-dn] [-rDepth] <folderItemPath>

Arguments

<-a activityName>

If specified, the files will be checked out in the given activity. If the activity is not specified then the default activity for the workspace is used. If the specified activity does not exist then it will be created.

[-dn]

Specified if the name of the activity given is the display name and not the actual name. This is only to specify to use an already existing activity.

[-rDepth]

If this option is specified and one of the path(s) is a folder, then the items under the folder will be added recursively until the depth specified (as number).

There should not be spaces between the option and the number.

<folderItemPath>

The path to the folder with the items to add.

Description

Adds specified folder items to the workspace. Takes the path(local/remote) as an argument. Wild characters are accepted.

Example

add c:\temp -r10

There should be no spaces between the option and the value.

Example

The user's current working directory is /path/to/wsp1/dir1/dir2 , the dir2 folder is an already existing folder and already synchronized with the local file system. A new dir3 folder shall be created under the folder dir2 , and in this folder a new file a.txt . Finally folder dir3 shall be added to the repository including all contained files:

  1. Execute cd in order to get the local current working directory.

  2. Open this folder using an operating system tool (Windows Explorer, for example) and create a new folder named dir3.

  3. Under dir3 , create a new file a.txt .

  4. Execute the following command: add -a my_new_activity -r1 dir3

    As the result, a new activity with the display name my_new_activity is created, dir2 is checked out in this activity, and both dir3 and dir3/a.txt are added to this activity as new resources.

    The -r option specifies that the dir3 folder shall be added, including its members up to and including depth 1.

    Note

    Currently, there is no explicit way to specify the "depth-infinity" with the -r option. Instead, the user can use a relatively high number as depth (100, for example), which would practically mean "depth-infinity".

· To verify this, you can use the following command:

act -a my_new_activity -dn

The -dn option says that the value of the -a option is the display name of the activity and not the activity name.

· Finally, execute the following command:

checkin -a my_new_activity -den

For more information, see CHECKIN .