The rebase command reconfigures a stream by adding, dropping, or replacing one or more of the stream's foundation baselines. The file and directory versions selected by those new baselines (and thus their associated activities) then become visible in the stream's views.
Only labeled baselines can serve as foundation baselines.
Any changes made in the stream before a rebase operation are preserved during the rebase. For any file modified in the stream, rebase merges any changes that are present in versions of that file in the new foundation baselines into the latest version of that file in the stream, thereby creating a new version. All such merged versions are captured in the change set of an integration activity that rebase creates. This integration activity becomes the view's current activity until the rebase operation is completed or canceled. No integration activity is created if there is nothing to merged; for example, when you rebase a newly created view, there is nothing to merge.
You must perform a rebase operation in a view belonging to the stream that is being rebased. Before starting the rebase operation, it is good practice to check in all files in that view. By default, the rebase operation stops when it encounters a checkout conflict. However, for a project or a stream enabled with the POLICY_REBASE_CO policy, and for single stream project, rebase skips the checked-out file and continue with other files.
If you want to recommend a baseline after rebasing to it, you must add it to the list of recommended baselines with chstream –recommended.
As a rule, you should rebase development streams often to pick up changes in the project's recommended baselines. By doing so, you can find integration problems early, when they are easier to fix. In addition, rebasing just before performing a deliver operation reduces or eliminates the need for manual merging during the delivery.
A stream can be rebased to a baseline that meets any of the following criteria:
Additional rules apply to integration streams and development streams in selecting a baseline:
Rebase is typically used to advance a stream's configuration, that is, to replace its current foundation baselines with more recent ones. However, under certain conditions, rebase can be used to revert a baseline, and to add or drop a component in a stream's configuration. It can also switch to a baseline that is neither an ancestor nor a descendant of the current foundation. The rules explained above are general rules for all rebase operations. You need to satisfy only the general rules when adding a component to a stream. When you advance, revert, drop, or switch a baseline, you need to satisfy the general rules and some additional ones.
These rules ensure that any changes made in a stream are not lost when the configuration changes.
In a rebase operation, automatic merging is the default behavior for elements, unless user or never merge types were set for the elements. For information about setting merge behavior for an element type, see mkeltype.
Rebase and deliver operations handle elements of user or never merge types in much the same way. For more information, see this topic in the deliver reference page.
Specifying the stream alone is sufficient for canceling, previewing, resuming, completing, and checking status of a rebase operation. A view is not required. When beginning a new rebase operation, a view is required if it cannot be uniquely determined.
stream-selector is of the form [stream:]stream-name[@vob-selector], where vob-selector specifies the stream's project VOB.
If any new versions have been checked in, the cancellation process is halted, and you are informed of completed merges and any checked in versions that resulted from the rebase activity. After undoing the merges and checkins, you must issue the rebase –cancel command again to cancel the rebase operation.
As a modifier of –preview, displays a list of versions that potentially require merging, in addition to the default information displayed by –preview.
baseline-selector is of the form [baseline:]baseline-name[@vob-selector], where vob-selector specifies the baseline's project VOB.
If you rebase to a composite baseline, you need not specify multiple baselines separately. Any additions to the composite baseline dependencies are propagated through subsequent rebase operations.
baseline-selector is of the form [baseline:]baseline-name[@vob-selector], where vob-selector specifies the baseline's project VOB.
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.
cmd-context rebase –recommended
Advancing to baseline "BL1.119" of component "webo_modeler"
Updating rebase view's config spec...
Creating integration activity...
Setting integration activity...
Merging files...
No versions require merging in stream "chris_webo_dev".
Build and test are necessary to ensure that the merges were completed
correctly.
When build and test are confirmed, run "cleartool rebase -complete".
cmd-context rebase –completeRebase in progress on stream "chris_webo_dev".
Started by "ktessier" at 06/06/00 15:36:42.
Merging files...
No versions require merging in stream "chris_webo_dev".
Checking in files...
Clearing integration activity...
Updating stream's configuration...
Cleaning up...
Rebase completed.