mkstream

Creates a stream or stream template for a project

Applicability

Product

Command type

VersionVault

cleartool subcommand

VersionVault Remote Client

rcleartool subcommand

Platform

UNIX®

Linux®

Windows®

Synopsis

  • VersionVault—Create an integration stream in a project:
    mkstream –int/egration –in project-selector
    [ –c/omment comment | –cfi/le pname | –cq/uery

    | –cqe/ach | –nc/omment ]

    [ –bas/eline baseline-selector[,... ]]

    [ –pol/icy policy-keyword[,... ]]

    [ –npo/licy policy-keyword[,... ]]

    [ –tar/get stream-selector ] [ -deliver_to integration-view-tag ]

    [ stream-selector... ]

  • VersionVault—Create a development stream in a project or a stream:
    mkstream –in { project-selector | stream-selector }
    [ –c/omment comment |–cfi/le pname | –cq/uery

    | –cqe/ach | –nc/omment ]

    [ –bas/eline baseline-selector[,... ]]

    [ –pol/icy policy-keyword[,... ]]

    [ –npo/licy policy-keyword[,... ]]

    [ –reado/nly ] [ -deliver_to integration-view-tag ]

    [ stream-selector... ]

  • VersionVault—Create an integration stream template:
    mkstream –template
    [ –c/omment comment | –cfi/le pname | –cq/uery

    | –cqe/ach | –nc/omment ]

    [ –pol/icy policy-keyword[,... ]]

    [ –npo/licy policy-keyword[,... ]]

  • VersionVault—Add the specified components to the list of modifiable components for the stream at stream-creation time:
    mkstream –amodcomp component_selector[,... ]
  • VersionVault Remote Client—Create an integration stream in a project:
    mkstream –int/egration –in project-selector
    [ –c/omment comment | –cq/uery

    | –cqe/ach | –nc/omment ]

    [ –tar/get stream-selector ] [ -deliver_to integration-view-tag ]

    [ stream-selector ]

  • VersionVault Remote Client—Create a development stream in a project or a stream:
    mkstream –in { project-selector | stream-selector }
    [ –c/omment comment | –cq/uery

    | –cqe/ach | –nc/omment ]

    [ –reado/nly ] [ -deliver_to integration-view-tag ]

    [ stream-selector... ]

Description

The mkstream command creates a stream for use with a UCM project. A stream consists of a name, a set of baselines that configure the stream, and a record of the set of activities associated with the stream.

There are two kinds of streams with UCM projects:

  • As a shared work area for integrating work from different sources. This is called the project's integration stream. Each project has exactly one integration stream.
  • As an isolated work area for use in code development. This is called a development stream. A project can have any number of development streams. A development stream can have child streams. There is no limitation on the number of nested levels of streams.

To create an integration stream, you must specify its project. Note that a project's integration stream must be present before a development stream can be created.

To create a development stream, you must specify a stream as its parent. Specifying a project is equivalent to specifying the project's integration stream. By default, the development stream delivers to the integration stream and rebases from recommended baselines of the integration stream. If you specify a development stream as its parent, the stream becomes the child of that development stream and delivers to and rebases from its parent.

Optionally, you can assign the stream a set of foundation baselines. Foundation baselines specify a stream's configuration by selecting the file and directory versions that are accessible in the stream.

Streams are accessed through views (see mkview –stream). A stream can have more than one view attached to it.

Integration stream templates

You can create an integration stream template for each project VOB. You must have administrator privileges and create the template from the project VOB directory. With an integration stream template you can select policies that are applied to all subsequent integration streams created in the project VOB. Use of this feature ensures consistent policy enablement across projects.

Stream policies

You can set or unset policies for integration streams or development streams. Note that the project's policy settings take precedence over the stream's settings, unless –spolicy is used in the project to allow individual streams to control the policy. The following table describes these policies and lists the keywords used to set them. For more information about setting policies, see the Help.

Table 1. UCM Stream Policies

Policy

Keyword

Skip permission checking to allow any user to modify a stream with chstream or a baseline with chbl.

POLICY_CHSTREAM_UNRESTRICTED

Require a development stream to be based on the current recommended baselines of its parent stream before it can deliver changes to the parent stream.

POLICY_DELIVER_REQUIRE_REBASE

Do not allow delivery from a development stream that has checkouts. If both POLICY_DELIVER_NCO_SELACT and this policy are enabled, the former overrides this policy.

POLICY_DELIVER_NCO_DEVSTR

Allow delivery of activities that have no checkouts or do not depend on activities that have checkouts. If both POLICY_DELIVER_NCO_DEVSTR and this policy are enabled, this policy overrides the former.

POLICY_DELIVER_NCO_SELACT

Prevent the creation of duplicate baselines when a foundation baseline has already been reused in a previous "make baseline" operation and when the baseline that has been reused resides in a PVOB, which is not under the same AdminVOB hierarchy as the PVOB where the new baseline is being created. Note that this requires extensive checking that might slow performance.

POLICY_DISABLE_FDN_REUSE

Allow a rebase operation on the target stream while some of the files remain checked out in the view. However, if any version that is introduced into the stream in the rebase operation is the same element as a checked-out version, a conflict occurs and the rebase operation fails.

POLICY_REBASE_CO

Allow a deliver operation from a stream in the same project to include changes from the stream's foundation baselines.

POLICY_INTRAPROJECT_DELIVER _FOUNDATION_CHANGES

Allow a deliver operation from a stream in the same project to contain changes in components that are not included in the target stream's configuration. The changes in the missing components are not delivered. (Defaults are different for intraproject and interproject deliver operations.)

POLICY_INTRAPROJECT_DELIVER _ALLOW_MISSING_TGTCOMPS

Allow a stream from a different project to deliver changes from its stream to this stream.

POLICY_INTERPROJECT_DELIVER

Allow a deliver operation from a stream in a different project to include changes from the stream's foundation baselines. This policy is ignored if interproject delivery is disabled.

POLICY_INTERPROJECT_DELIVER _FOUNDATION_CHANGES

Require a deliver operation from a stream in a different project to deliver changes in all components. This policy is ignored if interproject delivery is disabled. (Defaults are different for intraproject and interproject deliver operations.)

POLICY_INTERPROJECT_DELIVER _REQUIRE_TGTCOMP_VISIBILITY

Allow a deliver operation from a stream in a different project to contain changes in components that are not modifiable in the target stream's configuration. The changes in the nonmodifiable components are not delivered. This policy is ignored if interproject delivery is disabled.

POLICY_INTERPROJECT_DELIVER _ALLOW_NONMOD_TGTCOMPS

Read-only streams

To provide some users with read-only access to a set of baselines, you can create a special type of development stream with the option –readonly. You cannot deliver to or from this stream, but you can rebase it. Read-Only streams are not restricted by the normal rebase rules. In the view attached to a Read-Only stream, you can create DOs and other view-private files, but you cannot make any changes to components.

To create a read-only stream, your UCM VOBs and PVOBs must be at feature level 3 or greater.

Restrictions

Identities:

No special identity required.

Locks:

An error occurs if there are locks on any of the following objects: the UCM project VOB.

Mastership:

(Replicated VOBs only) No mastership restrictions.

Options and arguments

Specifying the stream's role in the project

Default
Development stream.
–int/egration
Creates an integration stream, which is used for shared elements on a project and as a source for recording baselines. Each project can have exactly one integration stream.

Specifying the stream's parent

Default
None.
–in project-selector | stream-selector
Specifies the stream's parent. For an integration stream, it must be a project. For a development stream, it can be an integration stream or another development stream.

project-selector is of the form [project:]project-name[@vob-selector], where vob-selector specifies the project's project VOB.

stream-selector is of the form [stream:]stream-name[@vob-selector], where vob-selector specifies the stream's project VOB.

Event records and comments

Default
Creates one or more event records, with commenting controlled by your .versionvault_profile file (default: –c). See the comments reference page. Comments can be edited with chevent.
–c/omment comment | –cfi/le comment-file-pname |–cq/uery | –cqe/ach | –nc/omment
Overrides the default with the option you specify. See the comments reference page.

Stream configuration

Default
The stream's configuration is empty (that is, it has no foundation baselines).
–bas/eline baseline-selector[,... ]
Specifies one or more baselines to use as the stream's initial configuration. You can subsequently use rebase to change the stream's configuration.

baseline-selector is of the form [baseline:]baseline-name[@vob-selector], where vob-selector specifies the baseline's project VOB.

The following restrictions apply to the specified baselines:

  • For a development stream, a foundation baseline must be labeled or the initial baseline of a component.
  • For an integration stream, all foundation baselines must be either baselines created in other projects' integration streams, or be imported or initial baselines.

Setting stream policy

Default
None.
–pol/icy policy-keyword[,... ]
Enables the specified policy. See Stream policies.
–npo/licy policy-keyword[,... ]
Disables the specified policy. See Stream policies.

Setting the default deliver target for integration streams only

Default
None.
–tar/get stream-selector
Specify the default deliver stream of an integration stream. The target must be a stream in a different project and mastered in the local replica.

stream-selector is of the form [stream:]stream-name[@vob-selector] and wherevob-selector specifies the project VOB of a different project.

Creates a view and attaches it to the new stream.
Specifies a name for the view, in the form of a simple filename. For dynamic views, this name appears in the local host's file system as a subdirectory of /view, the viewroot directorydynamic-views root directory (by default, M:\). For example, the dynamic view experiment would appear as /view/experiment M:\experiment.
Adds a comment to the view-tag's entry in the view_tag registry file. Use lsview -long, or the graphical view-tag browser, to display the tag comment.

Setting default deliver target view

Default
None.
-deliver_to integration-view-tag
Specifies a view attached to the deliver target stream in the same project or in a different project.

Creating a read-only stream

Default
A modifiable development stream.
–reado/nly
Creates a Read-Only stream.

Specifying the stream name

Default
A generated name.
stream-selector ...
Specifies a stream name.

You can specify the stream as a simple name or as an object selector of the form [stream:]name@vob-selector, where vob-selector specifies a project VOB (see the cleartool reference page). If you specify a simple name and the current directory is not a project VOB, this command assumes the stream resides in the project VOB that is associated with the current view. If the current directory is a project VOB, that project VOB is the context for identifying the stream.

The stream name must be unique within the PVOB. All UCM objects share the same namespace. You will get an error if the name you provide collides with the name of an existing UCM object, for example, a project.

Creating an integration stream template

A set of parameters can be stored as an integration stream template. You can specify policies that will be used by all subsequently created integration streams for projects in this project VOB. To create a template, specify the –template option and policy information. You must have administrator privileges and create the template from the project VOB directory.

–template
Stores the specified information as an integration stream template. Each project VOB can have one integration stream template.

Creating modifiable components

For testing purposes, you can create a modifiable component that the parent project would otherwise define as nonmodifiable. Refer to the chstream reference page for information on the use of such components and the restrictions on their use.

–amodcomp
Makes the specified component modifiable by creating a Base VersionVault (that is, non-UCM) branch named stream_name_nonmod and associating it with the stream-modifiable component. Checkout operations are performed on the Base VersionVault branch and changes made on that branch are not included in any UCM activity change set. You cannot change the modifiability of a component in these circumstances:
  • The project already defines the component as modifiable.
  • The component is an integration stream component.
component-selector
Identifies the component that is to be made modifiable or nonmodifiable.

component-selector is of the form [component:]component-name[@vob-selector] where vob is the component's UCM project VOB.

If no vob-selector is given, the component is created in the project VOB if it contains the current working directory; otherwise, the component is not created.

The component name must be unique within the PVOB; otherwise, an error results.

Examples

The UNIX system and Linux examples in this section are written for use in csh. If you use another shell, you may need to use different quoting and escaping conventions.

The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.

In cleartool single-command mode, cmd-context represents the UNIX system and Linux shells or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt.

  • Create a development stream for the webo project.

    cmd-context mkstream –in webo_proj1@\webo_pvob \
    chris_webo_dev@\webo_pvob
    Created stream "chris_webo_dev".

  • Create an integration stream.

    cmd-context mkstream -integration -in webo_proj1 integration@\webo_pvob
    Created stream "integration".

  • Join a project. This example shows the sequence of commands to follow to join a UCM project on a UNIX® or Linux® system.
    1. Find the project-selector for the project you want to join. For example:

      cmd-context lsproject –invob /vobs/webo_pvob
      2007-03-01T16:31:33  webo_proj1  ktessier   "webo_proj1"
      2007-06-05T12:31:33  webo_proj2 ktessier   "webo_proj2"

    2. Create your development stream. For example:

      cmd-context mkstream -in webo_proj1@/vobs/webo_pvob \
      –baseline BL3@/vobs/webo_pvob chris_webo_dev@/vobs/webo_pvob

      Created stream "chris_webo_dev".

    3. Create a view attached to your development stream:

      cmd-context mkview -stream chris_webo_dev@/vobs/webo_pvob \
      -tag chris_webo_dev /export/views/chris_webo_dev.vws

      Created view.
      Host-local path: venus:/export/views/chris_webo_dev.vws
      Global path: /net/venus/export/views/chris_webo_dev.vws
      It has the following rights:
      User : chris : rwx
      Group: user     : rwx
      Other:          : r-x
      Attached view to stream "chris_webo_dev".

    4. Create a view attached to the project's integration stream:

      cmd-context mkview -stream integration@/vobs/webo_pvob \
      -tag webo_integ /export/views/webo_integ.vws