Fixing path crashes related to the new non-null roots
Dependencies
- [2]
IIV3EL2XCleanup, formatting, and fixing the Git feature - [3]
JZEI2QJVComparing file names - [4]
YN63NUZOSanakirja 1.0 - [5]
I52XSRUHMassive cleanup, and simplification - [6]
GHO6DWPIRefactoring iterators - [7]
LV34DUJYFormatting - [8]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [9]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [10]
3AMEP2Y5More convenient interface for channels - [11]
VO5OQW4WRemoving anyhow in libpijul - [12]
VYHHOEYHVersions and formatting - [13]
LCERQSWMCleanup - [14]
FTR3UCBEFixing yet another instance of `&name[2..]` (replaced with the encoding detector)
Change contents
- edit in libpijul/src/fs.rs at line 718
if dest.start == dest.end {// non-null root.return None} - replacement in libpijul/src/fs.rs at line 778
EdgeFlags::FOLDER | EdgeFlags::PARENT | EdgeFlags::PSEUDO,EdgeFlags::FOLDER | EdgeFlags::PARENT | EdgeFlags::BLOCK | EdgeFlags::PSEUDO, - replacement in libpijul/src/fs.rs at line 852[4.759605]→[4.1223:1394](∅→∅),[4.1394]→[4.113391:113421](∅→∅),[4.5912]→[4.113391:113421](∅→∅),[4.62720]→[4.113391:113421](∅→∅),[4.113391]→[4.113391:113421](∅→∅),[4.113421]→[4.132710:132796](∅→∅),[4.5997]→[4.759767:759848](∅→∅),[4.62804]→[4.759767:759848](∅→∅),[4.64035]→[4.759767:759848](∅→∅),[4.113502]→[4.759767:759848](∅→∅),[4.132796]→[4.759767:759848](∅→∅),[4.759767]→[4.759767:759848](∅→∅),[4.759848]→[4.32111:32131](∅→∅),[4.32131]→[2.19089:19278](∅→∅),[2.19278]→[4.113593:113643](∅→∅),[4.132907]→[4.113593:113643](∅→∅),[4.113593]→[4.113593:113643](∅→∅),[4.113643]→[4.0:79](∅→∅),[4.79]→[3.0:405](∅→∅)
for name in iter_adjacent(txn,txn.graph(channel),current.inode_vertex(),flag0,flag1,)? {let name = name?;let name_dest = txn.find_block(txn.graph(channel), name.dest()).unwrap();name_buf.clear();debug!("getting contents {:?}", name);changes.get_contents(|h| txn.get_external(&h).unwrap().map(|x| x.into()),*name_dest,&mut name_buf,).map_err(FsErrorC::Changestore)?;let FileMetadata { basename, .. } = FileMetadata::read(&name_buf);if basename == c {let age = txn.get_changeset(txn.changes(&channel), &name.dest().change).unwrap();if let Some((ref mut next, ref mut next_age)) = next {ambiguous = true;if age < *next_age {*next = name_dest;*next_age = age;'outer: loop {for name in iter_adjacent(txn,txn.graph(channel),current.inode_vertex(),flag0,flag1,)? {let name = name?;let name_dest = txn.find_block(txn.graph(channel), name.dest()).unwrap();if name_dest.start == name_dest.end {// non-null root, just continue.current = iter_adjacent(txn, txn.graph(channel), *name_dest, flag0, flag1)?.next().unwrap()?.dest();break 'outer}name_buf.clear();debug!("getting contents {:?}", name);changes.get_contents(|h| txn.get_external(&h).unwrap().map(|x| x.into()),*name_dest,&mut name_buf,).map_err(FsErrorC::Changestore)?;let FileMetadata { basename, .. } = FileMetadata::read(&name_buf);if basename == c {let age = txn.get_changeset(txn.changes(&channel), &name.dest().change).unwrap();if let Some((ref mut next, ref mut next_age)) = next {ambiguous = true;if age < *next_age {*next = name_dest;*next_age = age;}} else {next = Some((name_dest, age)); - edit in libpijul/src/fs.rs at line 893
} else {next = Some((name_dest, age)); - edit in libpijul/src/fs.rs at line 895
if let Some((next, _)) = next {current = iter_adjacent(txn, txn.graph(channel), *next, flag0, flag1)?.next().unwrap()?.dest()} else {return Err(FsErrorC::NotFound(FsNotFound(path.to_string())));} - edit in libpijul/src/fs.rs at line 904[4.760509]→[4.760509:760549](∅→∅),[4.760549]→[4.132988:133071](∅→∅),[4.6157]→[4.760636:760660](∅→∅),[4.62962]→[4.760636:760660](∅→∅),[4.64107]→[4.760636:760660](∅→∅),[4.113722]→[4.760636:760660](∅→∅),[4.133071]→[4.760636:760660](∅→∅),[4.760636]→[4.760636:760660](∅→∅),[4.760660]→[4.113723:113750](∅→∅),[4.113750]→[4.133072:133096](∅→∅),[4.133096]→[4.760708:760725](∅→∅),[4.760708]→[4.760708:760725](∅→∅),[4.760725]→[4.113751:113825](∅→∅),[4.32315]→[4.760849:760859](∅→∅),[4.113825]→[4.760849:760859](∅→∅),[4.760849]→[4.760849:760859](∅→∅)
if let Some((next, _)) = next {current = iter_adjacent(txn, txn.graph(channel), *next, flag0, flag1)?.next().unwrap()?.dest()} else {return Err(FsErrorC::NotFound(FsNotFound(path.to_string())));}