Why does taking a snapshot create a baseline?
![]()
(RTC 4.0.4) I tested creating a source control snapshot, and deliberately did not tick the "Create a baseline" option. But a baseline was created, and when I deleted the snapshot the baseline remained! Why does taking a snapshot create a baseline?
|
Accepted answer
![]()
Unless the internals have changed drastically since version 3...
First off, a snapshot is simply a collection of baselines, that's it. Internally (i.e. in the APIs) there is in fact no such thing as a "snapshot", instead they are referred to as baseline sets; I supposed the decision was made at some point that snapshot was a better external name for the concept. A baseline is point in time record of the state of a component. Because a stream contains one or more components, taking a snapshot of a stream could (possibly) result in the creation of one or more baselines. Snapshot is to stream as baseline is to component. I say possibly because typically when taking a snapshot RTC will not create a new baseline for a given component if that component has no additional changes in the stream since the last baseline. Imagine that you have a stream with two components, A & B. If A rarely changes but B changes often it's quite possible that a given baseline for A will be part of many snapshots of the stream (since A does not change often). I believe (but can not say for sure) that the checkbox you're referring to will force the creation of a new baseline. Eddie Breeveld selected this answer as the correct answer
Comments Yes, snapshot is composite baseline of all components. I tried in 4.0.4 its not reproducing now. it looks strange. ![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Jeff's answer is correct. A snapshot requires that there be a baseline in each component for the current state of the stream/workspace, and if there isn't one, the snapshot operation will always create a new baseline in that component. The checkbox means "create a baseline even if it is not needed" (i.e. there already is a current baseline for that component that could be used in the snapshot). The only reason you would select that option is if you want the existence of that snapshot to appear in the baseline history of the component (i.e. you can look at the baseline history of the component and be able to tell immediately which baseline is being used by that snapshot).
|