4. AccuRev Workspaces and Reference Trees : Using a Workspace

Using a Workspace
As the name implies, a workspace provides a location for performing development tasks: editing source files, compiling, debugging, testing, creating web sites, etc.
Here are a few points that show how easy it is to do day-to-day work in a workspace:
The thing that’s special about a workspace is that it provides a two-way portal to the AccuRev data repository: you put your own changes into the repository, and you draw out the changes that your colleagues have previously recorded there.
Putting Data Into the Repository
A workspace enables you to create new versions of the files in a particular depot. (Each workspace is based on a particular stream, which belongs to a particular depot.) First, you use any development tools to work with the workspace’s copies of existing versions; then you use AccuRev commands to store new versions in the depot. In addition to creating new versions of existing files (keep command), you can use the workspace to add new files and directories to the depot (add command), rename files and directories (move command), and even rearrange the depot’s directory hierarchy (move command).
Workspaces provide an isolated, private development environment. The changes you make become public only when you enter a promote command. This creates versions of one or more elements in the parent stream. These versions are public: your changes are now visible to the entire sub-tree of streams under the parent stream. Subsequent promotions to higher-level streams will make the changes available to a larger sub-tree of streams and workspaces.
Getting Data Out of the Repository
A stream is a configuration of a depot. A typical stream has new versions entering it all the time. Some of the versions are promoted from the workspaces based on them, as described just above; other versions are inherited automatically from higher-level streams. (See Inheriting Versions From Higher-Level Streams.)
As new versions enter a stream, they become available to the sub-tree of streams and workspaces under that stream. But AccuRev never copies a new version of a file into your workspace automatically. Instead, you periodically use AccuRev commands to update the workspace. This replaces existing files (or adds new ones), so that the files in the workspace accurately reflect the stream’s versions and path elements, including any recently-arrived versions. AccuRev takes care not to overwrite files that you’re working on when it copies new versions to the workspace.

Micro Focus