mkbl

Creates a UCM baseline

APPLICABILITY

ClearCase UCM (cleartool subcommand)

SYNOPSIS

DESCRIPTION

The mkbl command creates a baseline or set of baselines. A baseline represents a stable source configuration for a component. A baseline's extent is limited to one component. That is, you can create one baseline per component. A baseline is a version of a component; it includes one version of selected elements of a component.

You create baselines in the context of a view in that the baseline's versions are chosen from those presented by the view/stream configuration.

By default, all activities in a stream and all components modified by those activities are considered as candidates for new baselines. You can also create baselines for a subset of components in the stream or for specific activities.

Initial Baseline

When you create a component, it includes an initial baseline whose name is of the form component-name_INITIAL. This baseline selects the /main/0 version of the component's root directory and serves as a starting point for successive baselines of the component.

Creating a Baseline for a Component

By default, the mkbl command finds all components that have been modified since their previous baseline was created. A new baseline is created for each changed component.

Use the -component option to create a baseline for a specific component or components.The default behavior is to find all components that have been modified and create a baseline for each component.

Use the -identical option to create a new baseline for a component that has not been modified. This can be useful in working with several components. You can create new baselines for a set of components independent of whether they have been modified.

Creating a Baseline for a Set of Activities

By default, all activities modified since the last baseline was made are captured in new baselines. You can select a subset of activities for inclusion in the baseline. If there are dependencies between the change sets of activities, you may not be able to include just the activity you want; you'll also need to include those activities that it depends on.

A single baseline is created if the selected activities are part of the same component. If an activity modifies more than one component, a new baseline is created for each component it modifies.

Creating a Baseline by Importing a Label

You can recognize a VOB as a component with the mkcomp command. When you do this, the VOB is given an initial baseline that selects the /main/0 version of the component root directory. However, this baseline does not give you access to files and directories that are already in the VOB.

You can create a new baseline that corresponds to a set of labeled versions in the VOB. To do this, use the -import option, specifying a label-type-selector. The mkbl command creates a baseline that selects the labeled versions, making them accessible to the UCM project.

Before creating the baseline, be sure that the label is unlocked and ordinary (not global) and that labeled elements are checked in. The label is locked when the baseline is created and you cannot move the label later. Be certain the label selects a version of all visible elements.

Baseline Names

Baseline identifiers are made up of two parts: an automatically generated extension and a user-specifiable root name. Baseline identifiers cannot contain spaces.

This root name is appended with a unique numeric extension. Multiple components in the same stream or multiple projects can each have baselines with the same root name. However, a root name can be used only once per component per stream.

When you create a baseline by importing a label, the root name is derived from the label's type selector. For example, the label-type selector REL1@/vobs/baz generates a baseline root name of REL1 whose scope is the baz component.

Baseline Labels

You can choose whether versions of the baseline are labeled when the baseline is created. Baselines can be unlabeled, incrementally labeled, or fully labeled.

All baselines record a component's current configuration in a stream, but only labeled baselines can be used to configure other streams (via the rebase operation or mkstream).

Choose a labeling scheme that suits your project's structure. Incremental baselines are typically faster to create than full baselines. The advantage of full baselines is that all versions are labeled and thus visible from the Version Tree Browser and in other contexts, including non-UCM contexts.

You can change the labeling status for a baseline with the chbl command.

The following options control labeling during baseline creation:

Promotion Levels

Baselines are marked with a promotion level that signifies the quality of the baseline. When created, a project VOB is assigned the following ordered set of promotion levels: REJECTED, INITIAL, BUILT, TESTED, and RELEASED. INITIAL, which is the default promotion level, is assigned to new baselines when they are created. You can modify the default settings by supplying a new set of promotion levels, reordering a set, or changing the default promotion level. See the setplevel command for further information.

Ordered promotion levels can be used to filter lists of baselines. Promotion level is also used to populate the default list of baselines during a rebase operation on a stream. Each project defines a default rebase level. When a project is created, the default rebase level is set to the project VOB's default promotion level. See mkproject and chproject for more information.

PERMISSIONS

Permissions Checking: No special permissions are required.

Locks: An error is generated if there are locks on any of the following objects: UCM project VOB, component, containing stream, label.

Mastership: The master replica of the indicated objects must match the replica (originally) performing the operation.

OPTIONS AND ARGUMENTS

EVENT RECORDS AND COMMENTS. Default: Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: -cq). See CUSTOMIZING COMMENT HANDLING in 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.

SELECTING A VIEW AND STREAM.

-vie·w view-tag

Specifies the view from which to create the baseline. The baseline is created in the stream that the view is attached to.
For example, if you are working in coyne_dev_view, but want to create a baseline from the configuration specified by the view coyne_integration_view, use -view coyne_integration_view. This creates a baseline in the project's integration stream that includes all the checked-in versions contained in coyne_integration_view. If you do not specify view-tag, the current view is used.

SELECTING COMPONENTS. Default: A baseline is made for each component in the stream that has been modified since its previous baseline was made.

-com·ponent component-selector[,...]

Specifies the components for which baselines are made.
component-selector is of the form: [component:]component-name[@vob-selector] and vob is the component's UCM project VOB.
-all

Creates a baseline for each component in the stream that has been modified since the last full baseline.
-ide·ntical

Creates a new baseline in a component that has not been modified since its previous baseline was created.

SELECTING ACTIVITIES.

-act·ivities activity-selector, ...

Specifies a list of activities to include in the new baselines.
activity-selector is of the form: [activity:]activity-name[@vob-selector] and vob is the activity's UCM project VOB.
By default, all activities with changes that are not recorded in the last baselines are recorded in the new baselines. You can use this option to include only a subset of the unrecorded changes in the new baselines. A baseline is created for each component that has unrecorded changes in the specified list of activities.
The list of activities must be complete. That is, they must not depend on the inclusion of any other activities. Activity A2 is dependent on activity A1 if they both contain versions of the same element and A2 contains a later version than A1. If the list of activities is incomplete, the required activities are listed and the operation fails.

SELECTING LABELING BEHAVIOR. Default: Incremental labeling.

-nlabel

Specifies that versions for this baseline are not labeled. Unlabeled baselines cannot be used as foundation baselines, but can be used by the diffbl command and labeled later.
-inc·remental

Labels only versions that have changed since the last full baseline was created.
-fu·ll

Labels all versions visible below the component's root directory.

SPECIFYING A LABEL TO IMPORT.

-imp·ort label-type-selector

Creates a baseline using versions marked with the specified label-type-selector. The label type must be applied to the component's root directory and to every element below the root directory that you want to include in the component. Baselines are created as successors to the initial baseline. The scope of the label type must be ordinary.

BASELINE IDENTIFIERS.

baseline-root-name

Specifies the root portion of the baseline name.

EXAMPLES

Examples including 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 command interpreter prompt. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt. In Attache, cmd-context represents the workspace prompt.

cmd-context mkbl -c "Import BL2 label" -import BL2@\vobs\xroutines
cmd-context mkbl -component comp1@/vobs/mypvob baseln4@\vobs\mypvob
cmd-context mkbl -activities line-lib@\vobs\pvob1

SEE ALSO

chbl, diffbl, lsbl, rmbl



Feedback on the documentation in this site? We welcome any comments!
Copyright © 1999 by Rational Software Corporation. All rights reserved.