IPnom Home • Manuals • ClearCase

 Rational ClearCase Commands Reference

ClearCase Stuff:ClearCase LinksClearCase BooksClearCase Commands ReferenceClearCase ForumsClearCase News
Keyword Live Search (10 results max):
 Type in part of a ClearCase command in the search box.
Commands Index:


Modifies a UCM stream


ProductCommand type
ClearCasecleartool subcommand
ClearCase LTcleartool subcommand



chstream [ –c·omment comment | –cfi·le pname | –cq·uery
| –cqe·ach | –nc·omment ]
[ –tar·get stream-selector | –nta·rget ] [ –gen·erate ]
[ –pol·icy policy-keyword[,... ]] [ –npo·licy policy-keyword[,...] ]
[ –rec·ommended { baseline-selector[,...] | –def·ault }
| –nre·commended ]
{ stream-selector ... | –cvi·ew }


The chstream command allows you to set stream policies, specify the default deliver target for integration streams, and set recommended baselines.

For information about changing the stream's name, see rename.

Rules for Recommending a Baseline

You can recommend a baseline for a stream if the baseline is from the stream or the stream's foundation.

For a baseline not from the stream or the stream's foundation, the following rules apply:

  • The baseline must be from the same project as the stream.
  • The baseline must be contained in the stream, which means the baseline has been delivered to the stream, or the stream has rebased to the baseline or one of its descendants.
  • The baseline must contain the current recommended baseline, which means it must be a descendant of the current recommended baseline.

You are not required to recommend a baseline for every component in the stream's configuration.

You can clear the list of recommended baselines. Note that doing this step alone will cause problems when existing development streams rebase to the recommended baselines. The rebase operation will attempt to drop all baselines in the development streams' configuration. This operation will probably fail or produce errors and is, therefore, not desirable.

You can choose to reset the recommended baselines to baselines from the stream or the stream's foundation with or without clearing the recommended list. This allows the stream to return to a known correct state after being changed inadvertently to a bad list. However, if a baseline is recommended and later removed, you must clear the recommended list before you can set new recommended baselines.



You must have one of the following identities:

  • Project VOB owner
  • Stream owner
  • root (UNIX)
  • Member of the ClearCase administrators group (ClearCase on Windows only)
  • Local administrator of the ClearCase LT server host (ClearCase LT on Windows only)

Setting the stream policy POLICY_CHSTREAM_UNRESTRICTED skips the permission checking. For more information, see the mkstream reference page.


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


(Replicated VOBs only) Your current replica must master the stream.


Event Records and Comments

 Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: –nc). 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.

Setting the Default Deliver Target for Integration Streams Only


–tar·get stream-selector | –ntarget
Specifies the default deliver stream of an integration stream. The target must be a stream in a different project.

Using –ntarget clears the default deliver stream setting.

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

Updating the Stream's Copy of the Config Spec


Forces an update of the stream's copy of the config spec. Use this option after renaming the label type of a baseline, after renaming the branch type of a stream, and after adding modifiable components to a project.

Setting Stream Policy


–pol·icy policy-keyword[,... ]
Enables the specified policy. For information about stream policies, see mkstream.

–npo·licy policy-keyword[,... ]
Disables the specified policy. For information about stream policies, see mkstream.

Setting Recommended Baselines

An integration stream's default recommended baselines are its foundation baselines. A development stream has no default recommended baselines.

–rec·ommended { baseline-selector[,...] | –def·ault } | –nre·commended
Names a list of baselines that a stream recommends. You must always specify the full list of recommended baselines to change the list. With composite baselines, you may need to name only one baseline.

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

Using the –default option sets recommended baselines by computing the set of baselines that meet the promotion level specification — they are the latest baselines created in the stream at or above the specified promotion level for each component, or its foundation baseline if none has been created in the stream.

Using the –nrecommended option clears the list of recommended baselines previously set in a stream.

Specifying the Stream


stream-selector ...
Specifies one or more streams to be modified.

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

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, then this command assumes the stream resides in the project VOB associated with the current view. If the current directory is a project VOB, then that project VOB is the context for identifying the stream.

Specifies the stream connected to the current view to be modified.


The UNIX 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 shell or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt.

  • Set stream policy for lli_UNIT.TEST.

    cmd-context chstream –pol POLICY_CHSTREAM_UNRESTRICTED -cview
    Updated policies on stream "lli_UNIT.TEST".



ClearCase Links • ClearCase Books • ClearCase Commands Reference • ClearCase Forums • ClearCase News