Transactions and Workspaces

Over time, the version-controlled elements in a workspace change in two ways: you modify certain files yourself, using text editors and other development tools; and you periodically use the update command to get copies of the files that your colleagues have modified. Accordingly, at any given moment the version-controlled elements in a workspace fall into two categories:

Files placed in the workspace by the Update command

All of these files are unmodified copies of the versions in the workspace’s backing stream at the time of its most recent update. Some of these files may have been placed in the workspace during previous updates. Typically, some files are copied into the workspace when it is originally created and are never touched thereafter, because no new versions of the files are ever created in the backing stream.

AccuRev records the fact that the workspace is up-to-date as of the transaction that most recently precedes the time of the update. (This is completely accurate, no new versions could have been created between that transaction and the update.) This transaction is called the current update level of the workspace.

Files that you’ve worked on in the workspace

These are files that you’ve modified (or newly created), and whose changes you’ve preserved with the keep (or add) command. You may also have promoted the latest version you created to the workspace’s backing stream. AccuRev can quickly fulfill a request to update the workspace, because it doesn’t need to consider every file in the depot. Instead, it needs to process only the files that have gotten new versions since the workspace’s last update that are visible in the workspace’s backing stream. It accesses these versions by examining the set of transactions between the workspace’s current update level and the most recent transaction. When the update is complete, the most recent transaction becomes the workspace’s new update level.