The Revert Command

The Revert command implements an "undo change" capability for dynamic streams A stream whose configuration changes over time, with new versions promoted from child workspaces and/or from other dynamic streams. It also inherits versions from its parent stream.. It doesn't actually remove any versions from the stream or transactions from the repository; that never occurs, since it would be a violation of AccuRev's TimeSafe The aspect of AccuRev's architecture that guarantees the reproducibility of any previous configuration of a stream, a depot, or the entire repository. principle. Instead, Revert creates a new version of one or more elements in a workspace based on the stream. The contents of the new version are the result of "subtracting out" a certain set of changes from the stream's current version:

The "subtracting out" of content changes is performed by the Merge tool. Submitting a different set of versions to this tool effectively implements the reverse patch algorithm.

After the Revert command completes, you can verify the correctness of its work (and make further changes, if appropriate) in the workspace. Then, you can complete the "undo change to stream" process by promoting the new versions.

Invoking the Revert Command

There are several ways to invoke the Revert command:

Choosing a Workspace

AccuRev displays the workspaces that both:

The workspace you select will be used to perform a reverse patch An operation that removes a selected set of changes from the current version of a text-file element. See patch, change package. operation. AccuRev invokes the Merge tool in a special mode to perform this operation, with the file in the selected workspace as one of the contributors. It refuses to proceed if the file is currently active An element is said to be active in a workspace or stream if a new version of the element has been created there, and that version has not been either (1) promoted to the parent stream or (2) purged from the workspace or stream. See default group, backed, passive. An issue record is said to be active in a workspace or stream if the head version of one or more of its change package entries is in the stream's default group. in the workspace.