support undo operations

This commit is contained in:
Dustin J. Mitchell
2021-12-21 00:43:26 +00:00
parent 1647ba9144
commit 9d93928996
6 changed files with 280 additions and 56 deletions

View File

@@ -145,6 +145,12 @@ impl Replica {
Ok(())
}
/// Undo local operations until the most recent UndoPoint, returning false if there are no
/// local operations to undo.
pub fn undo(&mut self) -> anyhow::Result<bool> {
self.taskdb.undo()
}
/// Rebuild this replica's working set, based on whether tasks are pending or not. If
/// `renumber` is true, then existing tasks may be moved to new working-set indices; in any
/// case, on completion all pending tasks are in the working set and all non- pending tasks are