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 changes that were added to the stream in a specified promote transaction, or
the changes contained in a change package that is currently in the stream or in the workspace.
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.
There are several ways to invoke the Revert command:
Reverting a Transaction. Open a History Browser tab, showing the transactions for the dynamic stream where you want to perform the "undo". [how? ] Right-click the transaction to be reverted, and choose Revert from the context menu. Only transactions whose action is promote can be reverted.
Reverting a Change Package. Open a Stream Issues tab, showing the issues whose change packages are in the dynamic stream or workspace where you want to perform the "undo". [how? ]
AccuRev displays the workspaces that both:
Belong to you.
Are children of the stream whose transaction or change package you wish to revert.
(If you are already in a workspace, that is the workspace that is selected.)
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, unless the issue is being reverted in the workspace. In this case, AccuRev refuses to proceed if the file is modified in the workspace.