Skip to main content

write_revert_patches_where

Function write_revert_patches_where 

pub fn write_revert_patches_where(
    doc: &mut AutoCommit,
    from_heads: &[ChangeHash],
    to_heads: &[ChangeHash],
    keep: &dyn Fn(&Patch) -> bool,
) -> usize
Expand description

write_revert_patches for only the patches keep accepts: a restore of some items of a past version, or of everything but bookkeeping. The rest stay in the patch stream unwritten, so the indices of later sequence patches still line up. Returns how many patches were written.