Serial Development through Exclusive File Locking

Parallel development is flexible and powerful, but it is not appropriate for every situation. Some organizations don't like the extra steps involved in merging, even when merging is largely automated. Some files cannot be merged, because they are in binary format. (AccuRev’s merge algorithm handles text files only, not binary files such as bitmap images and Microsoft Office -automation documents.)

Accordingly, AccuRev supports serial development through its exclusive file locking feature. Each workspace is in parallel-development mode (exclusive file locking disabled) or is in serial-development mode (exclusive file locking enabled). You can also set locks on individual elements.

The serial development model places more restrictions on users in the edit stage, but it eliminates the merge stage altogether. Here's the standard scenario, in which all the workspaces are in serial-development mode:

  1. A user starts working on a file by specifying it in a checkout or anchor command. The file changes from being read-only to writable.
  2. AccuRev places an exclusive lock on the file. This prevents the file from being processed with co, anchor, or keep in other workspaces.
  3. The user can edit and keep any number of private versions of the file in his workspace. Then, the user promotes his most recently kept version to the backing stream. The exclusive file lock guarantees that no merge will be required before this promotion.
  4. After promote records the new version in the backing stream, things return to the initial state: AccuRev releases the exclusive lock, and the file returns to read-only status in the user’s workspace.
  5. A user in any workspace can now co or anchor the file, which starts the exclusive-file-locking cycle again.

For more details, see File Locking in Workspaces in the AccuRev CLI User’s Manual.

This is the start of your concept.