The backing stream is, in most cases, a dynamic stream. (It can also be a snapshot or a time-based stream.) A dynamic stream is a changing configuration of its depot. At any given moment, it (logically) contains a simple table that indicates particular versions of a set of elements. For example:
• passive versions: versions that the stream inherits from its parent stream. Inheritance is automatic and instantaneous: as soon as a new version enters the parent stream, it is inherited at once by the child stream.
• active versions: versions that have been Promoted to the stream, (usually) from lower-level workspaces and substreams. This set of versions constitutes the stream’s default group.In the configuration table above, all the garnet_dvt\... version-IDs indicate active versions in the garnet_dvt stream. All the garnet\... version-IDs indicate passive versions, inherited from the parent stream, named garnet.Note: When creating a new version of a file, the Keep command copies the file to the repository’s file-storage area, not to the workspace stream itself. The workspace stream just gets a version-ID for the new version; the version-ID serves as a pointer to the file in the file-storage area.
• It contains active versions, created by explicit user commands: Add, Keep, Rename, Defunct, etc. The new versions in the repository preserve the changes that you’ve made to files in your workspace tree. (There’s only one way to create an active version in a dynamic stream: the Promote command.)
• The last item is where the crucial difference between workspace streams and dynamic streams comes into play. The versions inherited by the workspace stream are not the ones currently in the backing stream, but the versions that were in the backing stream when the workspace was last updated. This is called the workspace’s update level. More precisely, AccuRev records the number of the depot’s most recent transaction — say, transaction #32155 — as the workspace stream’s update level. So we can rephrase the principle:Note: The update level of a workspace stream is very much like the optional basis time of a dynamic stream. Both mechanisms restrict the flow of versions to a child stream from its parent stream, based on a point in the depot’s development history.Thus, a workspace stream is not updated dynamically when changes occur to its parent stream. It gets new versions from the backing stream only when you issue an Update command. This is how AccuRev implements the workspace’s user-controlled “privateness”, isolating it from the changes regularly being recorded in the backing stream by other team members.
• a set of passive, inherited versions, created in transactions that do not exceed the workspace’s update level. (A file that you’ve Promote’d since the last update is an exception. The version is passive, but was created after the workspace’s update.)
• a set of active versions, which you’ve created in that workspace with such AccuRev user commands as Add, Keep, Rename, and Defunct.Roughly speaking, the set of versions in the workspace stream indicates what data currently should be in your workspace tree. Examples:
• The workspace stream contains active version garnet_dvt_mfj\9 of file commands.c, which you created with the Keep command. This means your workspace tree should contain a file commands.c that matches the repository file referenced by version-ID garnet_dvt_mfj\9.
• The workspace stream contains passive version garnet_dvt\6 of file start.sh. This means your workspace tree should contain a file start.sh that matches the repository file referenced by the version in the backing stream, garnet_dvt\6.If you modify a file without Keep’ing it (or modify it again after Keep’ing it), the file in the workspace tree does not exactly match the version in the workspace stream. AccuRev indicates this by reporting the file’s status as (modified).
• By invoking AccuRev commands to copy existing versions from the repository to the workspace tree. This can either overwrite existing files in the workspace tree or add new files. Both the Populate and Update commands copy versions from the workspace stream to the workspace tree. (So do a couple of other commands, such as Send to Workspace.)
Micro Focus |