Summary of rules for rebasing a stream
This topic summarizes the rules for rebase operations. You can rebase a stream to a baseline that meets any of the following criteria:
- The baseline is not from the stream that is being rebased.
- The baseline is labeled. (Baselines created by deliver operations are not labeled by default. You can change the labeling status of a baseline.)
Additional rules apply to integration streams and development streams in selecting a baseline. The following are general rules that apply to all types of rebase operations:
- An integration stream can be rebased only to a baseline that is created in another project or to an imported or initial baseline of that project.
- A development stream can be rebased to a baseline that meets one of the
following criteria:
- The baseline was created in its parent stream.
- The baseline is in the foundation set of its parent stream.
- The baseline is an ancestor of the foundation baseline of the parent of the development stream and was created on the same stream as the foundation baseline of the parent stream.
- The baseline was created in a stream other than its parent stream and is contained in its parent stream. (A baseline is contained in another baseline if all changes in the first baseline are included in the second baseline.)
You need to satisfy only the general rules if you are adding a component to a stream.
Rebase typically advances the configuration of a stream, that is, it replaces the current foundation baselines of the stream with more recent ones. However, under certain conditions, rebase can be used to revert a baseline; to add or drop a component in the configuration of a stream; and to switch to a baseline that is neither an ancestor nor a descendant of the current foundation. When you advance, revert, drop, or switch a baseline, you need to satisfy the general rules and the following additional ones:
- To advance the configuration of a stream, the new baseline must contain the current foundation baseline.
- To revert or drop a baseline for a component in a stream, one of the following
conditions must be met:
- The component is nonmodifiable.
- The component is modifiable but has not been modified in the stream, and the component is not in the configuration of any child streams.
- To switch to a baseline that is neither an ancestor nor a descendant of
the current foundation, one of the following conditions must be met:
- The component is nonmodifiable.
- The component is modifiable but has not been modified in the stream, and the component is not in the configuration of any child streams.
- The component has been modified, but the new baseline contains the current foundation baseline; and the component is not in the configuration of any child streams.
These rules ensure that any changes made in a stream are not lost when the configuration changes.