Archive: set the accurate and deterministic mtime
[?]
Jan 8, 2021, 11:03 AM
I3OVP3NHSMB2YLU4EPU5BFH7KB54PMQ4WDATGINIJKRIHMSVFUSQCDependencies
- [2]
GHO6DWPIRefactoring iterators - [3]
VO5OQW4WRemoving anyhow in libpijul - [4]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [5]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting).
Change contents
- replacement in libpijul/src/output/archive.rs at line 10
fn create_file(&mut self, path: &str, perm: u16) -> Self::File;fn create_file(&mut self, path: &str, mtime: u64, perm: u16) -> Self::File; - edit in libpijul/src/output/archive.rs at line 26
mtime: u64, - replacement in libpijul/src/output/archive.rs at line 55
fn create_file(&mut self, path: &str, permissions: u16) -> Self::File {fn create_file(&mut self, path: &str, mtime: u64, permissions: u16) -> Self::File { - edit in libpijul/src/output/archive.rs at line 64
mtime, - edit in libpijul/src/output/archive.rs at line 73
header.set_mtime(file.mtime); - replacement in libpijul/src/output/archive.rs at line 118
T: ChannelTxnT,T: ChannelTxnT + DepsTxnT<DepsError = <T as GraphTxnT>::GraphError>, - edit in libpijul/src/output/archive.rs at line 191
let mut latest_touch = 0;let mut latest_change = 0;for c in txn.iter_touched(output_item.pos)? {let (inode, change) = c?;if inode < output_item.pos {continue;} else if inode > output_item.pos {break;}if let Some(t) = txn.get_changeset(T::changes(&channel), change)? {if t > latest_change || latest_touch == 0 {latest_change = t;let ext = txn.get_external(change)?.unwrap();let c = changes.get_header(&ext).map_err(ArchiveError::P)?;latest_touch = c.timestamp.timestamp() as u64}}} - edit in libpijul/src/output/archive.rs at line 221
debug!("latest_touch: {:?}", latest_touch); - replacement in libpijul/src/output/archive.rs at line 223
let mut f = arch.create_file(&path, output_item.meta.permissions());let mut f =arch.create_file(&path, latest_touch, output_item.meta.permissions());