Versions Created by Merge, Patch, and Revert

Merge – Merging Two Versions into a New Real Version

The Merge and Patch commands are available only in the standalone AccuRev GUI and AccuRev Command Line Interface.

A standard merge operation combines the contents of two versions of a file:

  • The most recently kept version in your workspace stream. This version contains the changes that you have made to the file in your workspace.
  • The most recent version in the backing stream. This is the last version that was promoted.

The result file of the merge operation is kept as a new version in the workspace stream. (You can think of merging as a type of text-editing operation. As with any edit to a file, you preserve the results with Keep.) This new, merged version has two ancestors: the two versions listed above.

The Version Browser uses a solid red line to connect the existing version (called the direct ancestor or predecessor) with the new version. AccuRev always records real versions, not virtual versions, as the two ancestors of a new, merged version.

Patch: Selective Inclusion of Another Version's Changes

A patch operation is similar to a merge operation. In both, text from another version is incorporated into your workspace's version.

  • A merge operation considers the entire contents of the from version.
  • A patch operation considers only some of the changes in the from version. Typically, these are recent changes made by one user, recorded in one version or a set of consecutive versions.

The Version Browser uses a solid orange line to connect the existing version (called the direct ancestor or predecessor) with the new version.

Revert: Selective Removal of Changes to a Version

A revert operation is the opposite of a patch operation. It is sometimes referred to as a reverse patch operation. Whereas a patch adds a selected set of changes, a revert removes a selected set of changes. A version created by the Revert command has two ancestry lines:

  • A solid blue line indicates the version from which Revert removed some changes.
  • A solid black line indicates the basis version of the removed patch or change package entry.