Add Views: add-view

Use add-view to add a view to a StarTeam Server configuration from the command line. When the view is created, its parent view is the view specified with the -p option and its root folder is the folder specified with the -p option or it is the directory used in a previous session when not specifying a directory using the -p option. In this command, the -rp option specifies the working folder for the root folder. Use the following options to create the following types of views:

Syntax

The syntax for this command is:

stcmd{Ex} add-view  [[-p "projectSpecifier"] [-epwdfile "filePath"]
[-cmp] [-encrypt encryptionType] ][-rp "folderPath"] [-d "description"] 
[-dr [-ro | -ba | -bn [-cst | -cfgl "labelName" | -cfgp "stateName" | 
-cfgd "asOfDate" [-pattern "date-pattern"]]]]

Note: The specification of a parameter such as -ba requires the server configuration setting Disable Advanced Views to be turned off. It is on by default. You must specify -cfgd, -cfgp or -cfglso that the server does not treat the view as an advanced view. For example:

add-view -p "user:password@host:port/project" -name "viewname"
-rp "working folder" -dr -ba -cfgd "10/17/2014"  -pattern "M/d/y"

If you use the syntax above, then you don't need the option DisableAdvancedViews to have been set in the starteam-configs.xml file.

Note that if you use -cfgd, then the date time specified must be after the parent view was created.

Parameters

For information about the command parameters, refer to Operation Parameters.

In addition:

Parameter

Description

-dr

Specifies a derived view. All views, except blank views are derived. See also -ba, -bn, and -ro.

When used without -ba, -bn, or -ro, a read/write reference view is created. The configuration of a read/write reference view is the same configuration as its parent view. Therefore, using -dr without -ba, -bn, or -ro, but with -cfgl, -fgp, or -cfgd results in an error message.

When this option is not used, a blank view is created. For blank views, the value of the view property named Set Items Shared Into View To Branch On Change is initially cleared. Indicates the type of view to create.

  • Use -dr to create a read/write reference view.
  • Use -dr -ro to create a read-only reference view.
  • Use -dr -ba to create a branching view in which the behavior of existing items is set to branch on change.
  • Use -dr -bn to create a branching view in which the behavior of existing items is not set to branch on change.
  • If you do not use -dr, a blank view is created.
-ro When used with -dr, specifies a read-only reference view.
-ba

When used with -dr, specifies a branching view in which the behavior of existing items is set to branch on change. The value of the view property Set Items Shared Into View To Branch On Change is initially set. This option must be used with -dr.

-bn When used with -dr, specifies a branching view in which the behavior of existing items is not set to branch on change. The value of the view property Set Items Shared Into View To Branch On Change is initially cleared. This option must be used with -dr.
-cst Configures the view as of the current time on the StarTeam Server. This option must be used with one of the following combinations: -dr -ro , -dr -ba, or -dr -bn .

-cst, -cfgd, -cfpg, and -cfgl are mutually exclusive.

Examples

The following example uses add-view to create a branching view named Maintenance 5.1 on the computer named Orion. (Orion is running an instance of the StarTeam Server with a server configuration that uses port 1024.)

This command creates the view as a child of the existing StarDraw view and uses the StarDraw folder as its root folder. The new view is based on the label used for the last build of the 5.1 product before it shipped (Build 403). It has a working folder that is different from the parent’s working folder. All existing items in the view will have their behavior set to branch on change.

Use -p with add-view or the stateful set command to set the context of the project/view/parent folder.

stcmd add-view -rp "C:\StarDraw\Maintenance 5.1" -d "Maintenance view for 5.1 product release" -dr -ba -cfgl "Build 403"

The following example uses add-view to create a read/write reference view named Rooted At Source Code on the computer named Orion. This command creates the view as a child of the existing StarDraw view and uses the SourceCode folder as its root folder. It has the same working folder as its parent. Because a read/write reference view must have the same configuration as its parent, none of the -cfgl, -cfgp, and -cfgd options can be used.

stcmd add-view -cmp -encrypt "RC4" -name "Rooted At SourceCode" -d "StarDraw main view but with SourceCode folder as the root of the hierarchy" -dr