Fixing a bug in unrecord
[?]
Jan 7, 2021, 7:07 PM
JACZYXK43IU5HWLHQBY3BOAE7CUO6NGEXQ3HSZL3CQP3SLGKMBOACDependencies
- [2]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [3]
BD5PC25ADeleting conflict resolution vertices when the sides are deleted - [4]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [5]
VO5OQW4WRemoving anyhow in libpijul - [6]
6YMDOZIBRefactoring apply - [7]
I52XSRUHMassive cleanup, and simplification - [*]
76PCXGMLPushing to, and pulling from the local repository
Change contents
- edit in pijul/src/remote/mod.rs at line 94[9.772][3.54644]
root: Path::new(name).to_path_buf(), - replacement in libpijul/src/vertex_buffer.rs at line 79
fn output_line<E, C>(&mut self, _: Vertex<ChangeId>, c: C) -> Result<(), E>fn output_line<E, C>(&mut self, v: Vertex<ChangeId>, c: C) -> Result<(), E> - edit in libpijul/src/vertex_buffer.rs at line 86
debug!("vbuf {:?} {:?}", v, std::str::from_utf8(&self.buf)); - replacement in libpijul/src/vertex_buffer.rs at line 168
fn output_line<E, C>(&mut self, _: Vertex<ChangeId>, c: C) -> Result<(), E>fn output_line<E, C>(&mut self, v: Vertex<ChangeId>, c: C) -> Result<(), E> - edit in libpijul/src/vertex_buffer.rs at line 175
debug!("vbuf {:?} {:?}", v, std::str::from_utf8(&self.buf)); - replacement in libpijul/src/unrecord/mod.rs at line 522
|h| changes.knows(&intro_ext, &h).unwrap(),|h| changes.knows(&change_hash, &h).unwrap(), - edit in libpijul/src/missing_context.rs at line 172
debug!("deleted by unknown, repairing {:?}", source); - replacement in libpijul/src/missing_context.rs at line 177
reconnect_target_down(txn, channel, ws, inode, target, change_id, &mut known)if e.flag.contains(EdgeFlags::BLOCK) {repair_missing_down_context(txn, channel, ws, inode, target, &[target])?;} else if is_alive(txn, channel, source)? {repair_missing_down_context(txn, channel, ws, inode, target, &[source])?;}Ok(()) - edit in libpijul/src/missing_context.rs at line 209[3.11910]→[3.704864:704870](∅→∅),[3.704864]→[3.704864:704870](∅→∅),[3.704870]→[3.11911:11924](∅→∅),[3.11924]→[3.704870:704871](∅→∅),[3.704870]→[3.704870:704871](∅→∅),[3.704871]→[2.89964:90010](∅→∅),[2.90010]→[3.11966:11983](∅→∅),[3.11966]→[3.11966:11983](∅→∅),[3.11983]→[2.90011:90039](∅→∅),[2.90039]→[3.12013:12146](∅→∅),[3.12013]→[3.12013:12146](∅→∅),[3.12146]→[2.90040:90085](∅→∅),[2.90085]→[3.12186:12222](∅→∅),[3.12186]→[3.12186:12222](∅→∅),[3.12222]→[3.704871:705017](∅→∅),[3.704871]→[3.704871:705017](∅→∅),[3.705017]→[2.90086:90157](∅→∅),[3.57956]→[3.705105:705429](∅→∅),[2.90157]→[3.705105:705429](∅→∅),[3.12273]→[3.705105:705429](∅→∅),[3.705105]→[3.705105:705429](∅→∅),[3.705429]→[2.90158:90223](∅→∅),[2.90223]→[3.705493:705601](∅→∅),[3.705493]→[3.705493:705601](∅→∅)
}Ok(())}fn reconnect_target_down<T: GraphMutTxnT, K>(txn: &mut T,channel: &mut T::Graph,ws: &mut Workspace,inode: Position<Option<Hash>>,target: Vertex<ChangeId>,change_id: ChangeId,known: &mut K,) -> Result<(), MissingError<T::GraphError>>whereK: FnMut(Hash) -> bool,{// Finally, we fix the down context of target, i.e. collecting unknown deleted children.let mut children_are_deleted_by_unknown = false;for v in iter_adj_all(txn, channel, target)? {let v = v?;if !v.flag.contains(EdgeFlags::DELETED)|| v.flag.contains(EdgeFlags::PARENT)|| v.introduced_by == change_id|| v.dest.change.is_root()|| v.introduced_by.is_root(){continue;}// This unwrap is ok, since `v` is in the channel.let intro = txn.get_external(v.introduced_by)?.unwrap();if !known(intro) {children_are_deleted_by_unknown = true;break;} - edit in libpijul/src/missing_context.rs at line 210
if children_are_deleted_by_unknown {repair_missing_down_context(txn, channel, ws, inode, target, &[target])?;} - replacement in libpijul/src/alive/retrieve.rs at line 59
debug!("child {:?}", dest_vid);trace!("child {:?}", dest_vid); - edit in libpijul/src/alive/retrieve.rs at line 77
debug!("not alive: {:?}", vertex); - edit in libpijul/src/alive/retrieve.rs at line 96
debug!("flags for {:?}: {:?}", vertex, flags);