for change_ in change.changes.iter().rev().flat_map(|r| r.rev_iter()) {
match *change_ {
Atom::EdgeMap(ref newedges) if newedges.edges[0].flag.contains(EdgeFlags::FOLDER) => {
if newedges.edges[0].flag.contains(EdgeFlags::DELETED) {
let mut f = std::fs::File::create("debug_unrecord").unwrap();
crate::pristine::debug(txn, &channel, &mut f).unwrap();
working_copy::undo_file_deletion(txn, changes, channel, change_id, newedges)?
} else {
working_copy::undo_file_reinsertion::<C, _>(txn, change_id, newedges)?
}
}
Atom::NewVertex(ref new_vertex)
if new_vertex.flag.contains(EdgeFlags::FOLDER)
&& new_vertex.down_context.is_empty() =>
{
working_copy::undo_file_addition(txn, change_id, new_vertex)
.map_err(UnrecordError::Txn)?;
}
_ => {}
}
}