Fixing a bug in unrecord
[?]
May 9, 2021, 8:59 PM
IXC43DSHDSXCE2X6H6N47GGVKTYM2D2BUUWF34CFWMFT6Z45NOOACDependencies
- [2]
I24UEJQLVarious post-fire fixes - [3]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [4]
6YMDOZIBRefactoring apply - [5]
GHO6DWPIRefactoring iterators - [6]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [7]
VO5OQW4WRemoving anyhow in libpijul - [*]
YN63NUZOSanakirja 1.0 - [*]
23LVKATNUse pager crate for log output
Change contents
- edit in libpijul/src/unrecord/mod.rs at line 230
must_reintroduce: HashSet<(Vertex<ChangeId>, Vertex<ChangeId>)>, - edit in libpijul/src/unrecord/mod.rs at line 369
ws.must_reintroduce.clear();for n in newedges.edges.iter() {let mut source = crate::apply::edge::find_source_vertex(txn, channel, &n.from, change_id, newedges.inode, n.flag, &mut ws.apply)?;let mut target = crate::apply::edge::find_target_vertex(txn, channel, &n.to, change_id, newedges.inode, n.flag, &mut ws.apply)?;loop {let intro_ext = n.introduced_by.unwrap_or(ext);let intro = internal(txn, &n.introduced_by, change_id)?.unwrap();if must_reintroduce(txn, channel, changes, source, target, intro_ext, intro, change_id)? {ws.must_reintroduce.insert((source, target));}if target.end >= n.to.end {break;}source = target;target = *txn.find_block(channel, target.end_pos()).map_err(UnrecordError::from)?;assert_ne!(source, target);}}let reintro = std::mem::take(&mut ws.must_reintroduce); - replacement in libpijul/src/unrecord/mod.rs at line 399[3.1845]→[3.241314:241349](∅→∅),[3.241314]→[3.241314:241349](∅→∅),[3.241349]→[3.1846:1931](∅→∅),[3.1931]→[3.241604:241619](∅→∅),[3.241604]→[3.241604:241619](∅→∅)
|txn, channel, a, b| {must_reintroduce(txn, channel, changes, a, b, ext, intro, change_id)},|a, b| reintro.contains(&(a, b)), - edit in libpijul/src/unrecord/mod.rs at line 403
ws.must_reintroduce = reintro;ws.must_reintroduce.clear(); - replacement in libpijul/src/apply.rs at line 9
mod edge;pub(crate) mod edge; - replacement in libpijul/src/apply.rs at line 248
|_, _, _, _| Ok::<bool, LocalApplyError<T::GraphError>>(true),|_, _| true, - replacement in libpijul/src/apply.rs at line 270
|_, _, _, _| Ok::<bool, LocalApplyError<T::GraphError>>(true),|_, _| true, - replacement in libpijul/src/apply/edge.rs at line 6
pub fn put_newedge<T, E, F, K>(pub fn put_newedge<T, F, K>( - replacement in libpijul/src/apply/edge.rs at line 15
) -> Result<(), E>) -> Result<(), LocalApplyError<T::GraphError>> - replacement in libpijul/src/apply/edge.rs at line 18
E: From<LocalApplyError<T::GraphError>> + From<TxnErr<T::GraphError>>,F: Fn(&mut T, &mut T::Graph, Vertex<ChangeId>, Vertex<ChangeId>) -> Result<bool, E>,F: Fn(Vertex<ChangeId>, Vertex<ChangeId>) -> bool, - replacement in libpijul/src/apply/edge.rs at line 40
collect_nondeleted_zombies::<_, E, _>(collect_nondeleted_zombies::<_, _>( - replacement in libpijul/src/apply/edge.rs at line 68
if apply_check(txn, graph, source, target)? {if apply_check(source, target) { - replacement in libpijul/src/apply/edge.rs at line 94
fn collect_nondeleted_zombies<T, E, K>(fn collect_nondeleted_zombies<T, K>( - replacement in libpijul/src/apply/edge.rs at line 101
) -> Result<(), E>) -> Result<(), LocalApplyError<T::GraphError>> - edit in libpijul/src/apply/edge.rs at line 104
E: From<LocalApplyError<T::GraphError>> + From<TxnErr<T::GraphError>>, - replacement in libpijul/src/apply/edge.rs at line 152
fn find_source_vertex<T: GraphMutTxnT>(pub(crate) fn find_source_vertex<T: GraphMutTxnT>( - replacement in libpijul/src/apply/edge.rs at line 173
fn find_target_vertex<T: GraphMutTxnT>(pub(crate) fn find_target_vertex<T: GraphMutTxnT>( - edit in Cargo.lock at line 950
"path-slash", - edit in Cargo.lock at line 1278
[[package]]name = "path-slash"version = "0.1.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3cacbb3c4ff353b534a67fb8d7524d00229da4cb1dc8c79f4db96e375ab5b619" - edit in Cargo.lock at line 1317[10.1067][2.118314]
"path-slash",