Function revert_changes
pub fn revert_changes(
doc: &mut AutoCommit,
changes: &[(ChangeHash, String)],
authors: &dyn ResolveAuthor,
) -> Result<Vec<RevertOutcome>, RevertError>Expand description
Undo several changes, each on its own, into one open transaction:
changes pairs each change with the actor hex whose work it is, newest
first. Every revert is planned before any is written, because reading
the history closes the open transaction, which would commit the first
revert as a change of its own.
As with revert_run the caller commits. Each outcome’s
RevertOutcome::kept says what somebody else had set since and stays.
§Errors
RevertError::UnknownRun when a change is not in doc.