Making libpijul deterministic (and getting rid of `rand`)

[?]
May 18, 2021, 8:08 AM
2RXOCWUWOGHEKHT5W73LAHJSOZVRTOGS7BWLSIGEEEBJGMCZBXQAC

Dependencies

  • [2] 3MHUNYER Changing --amend flag to respect -m flag
  • [3] TPQHDDNC pijul add --force know adds ignored files
  • [4] ZAQU2MXM Better debugging output for `PathId`
  • [5] 3X4OWIU2 Sanakirja 1.2
  • [6] YCEZL7VF Moving to temporary paths when outputting
  • [7] K7JPP64S Faster error in unrecord when the change is not on the channel
  • [8] G7VOM2IM Returning an error when recording non-existent paths
  • [9] P6WE7YKL Unrecord did not check whether a file already existed before adding it back
  • [10] V435QOJR Using path-slash to fix path issues on Windows
  • [11] QL6K2ZM3 Tags
  • [12] ZHABNS3S Canonicalize all paths
  • [13] ZBNKSYA6 Fixing a bus error when starting a transaction on a full disk
  • [14] 5BRU2RRW Cleanup (debugging a crash related to trees/inodes)
  • [15] A3DMBJJA Upgrading the `git` subcommand to the latest Sanakirja and Libpijul
  • [16] BD5PC25A Deleting conflict resolution vertices when the sides are deleted
  • [17] IIV3EL2X Cleanup, formatting, and fixing the Git feature
  • [18] RXNT67OT Sanakirja version, and removing an unwrap
  • [19] 4OCC6D42 Recursive add
  • [20] PP3E3TRE Do not move source if destination is wrong
  • [21] I24UEJQL Various post-fire fixes
  • [22] MF3WAHBI commands/record: amend current change if unspecified
  • [23] 7UPL3Y2A Unrecord: don't restore the same unrecorded file deletion twice in the inodes and tree tables
  • [24] LCERQSWM Cleanup
  • [25] WI2OFAKL honor hidden files when using the pijul add subcommand
  • [26] 33SQMZYX New versions of dependencies
  • [27] 4VWXL6KQ Correct handling of ignore files
  • [28] CCLLB7OI Upgrading to Sanakirja 0.15 + version bump
  • [29] OU243LAB Support for staging
  • [30] MFTN7GBW Pre-tags cleanup + fast Sanakirja
  • [31] VO5OQW4W Removing anyhow in libpijul
  • [32] B3QWIGDE Fixing the Git features with the latest Pijul (+ conflicts in Cargo.toml)
  • [33] I52XSRUH Massive cleanup, and simplification
  • [34] ENKQ3QZG Forward the exit status messages from the SSH background loop to the client (solving hangs)
  • [35] JRENVH5D Reqwest 0.11
  • [36] 3J6IK4W2 Explicitly adding .pijul is now forbidden
  • [37] CXM5CBS2 Fixing `pijul remove` when files are not deleted
  • [38] GHO6DWPI Refactoring iterators
  • [39] IM6UFPOZ Fixing a test related to the tree/revtree tables
  • [40] 3AMEP2Y5 More convenient interface for channels
  • [41] IXC43DSH Fixing a bug in unrecord
  • [42] UFCZKKLX Upgrading to the latest Sanakirja/Rand
  • [43] YN63NUZO Sanakirja 1.0
  • [44] PJ7T2VFL Do not hang on locked repositories
  • [45] OJZWJUF2 MUCH faster `pijul add -r`
  • [46] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [47] KQTD46KV Unrecord: restore files *after* having unapplied the *entire* change
  • [48] 6DOXSHWG Cleanup, and version bump
  • [49] 5SLOJYHG Fixing the Git feature
  • [*] TZVUNELW Documentation comments
  • [*] HMMMKONL Fixing alive vertices
  • [*] Y6EVFMTA Don't output files if they aren't in the current channel

Change contents

  • replacement in pijul/src/remote/mod.rs at line 279
    [11.9035][11.7560:7657]()
    txn.archive_with_state(&changes, &mut channel, &state, extra, &mut tarball)?
    [11.9035]
    [11.61504]
    txn.archive_with_state(&changes, &mut channel, &state, extra, &mut tarball, 0)?
  • edit in pijul/src/remote/local.rs at line 133
    [11.1431]
    [11.1431]
    0,
  • replacement in pijul/src/commands/unrecord.rs at line 132
    [7.998][7.998:1074]()
    txn.write().unwrap().unrecord(&repo.changes, &channel, &hash)?;
    [7.998]
    [11.5477]
    txn.write().unwrap().unrecord(&repo.changes, &channel, &hash, 0)?;
  • edit in pijul/src/commands/unrecord.rs at line 145
    [11.5873]
    [11.5873]
    0,
  • replacement in pijul/src/commands/unrecord.rs at line 149
    [11.5939][11.5939:6012]()
    txn.write().unwrap().unrecord(&repo.changes, &channel, &h)?;
    [11.5939]
    [11.6012]
    txn.write().unwrap().unrecord(&repo.changes, &channel, &h, 0)?;
  • edit in pijul/src/commands/reset.rs at line 130
    [11.8744]
    [11.8744]
    0,
  • edit in pijul/src/commands/reset.rs at line 195
    [11.10991]
    [11.10991]
    0,
  • edit in pijul/src/commands/reset.rs at line 208
    [11.11372]
    [11.11372]
    0,
  • edit in pijul/src/commands/reset.rs at line 234
    [11.12197]
    [11.12197]
    0,
  • replacement in pijul/src/commands/record.rs at line 117
    [2.282][11.103921:103981](),[11.103921][11.103921:103981]()
    txn.unrecord(&repo.changes, &mut channel, &h)?;
    [2.282]
    [11.103981]
    txn.unrecord(&repo.changes, &mut channel, &h, self.timestamp.unwrap_or(0) as u64)?;
  • replacement in pijul/src/commands/record.rs at line 309
    [11.1494][11.14086:14131]()
    num_cpus::get(),
    [11.1494]
    [11.1494]
    1, // num_cpus::get(),
  • replacement in pijul/src/commands/record.rs at line 321
    [11.1810][11.14276:14313]()
    num_cpus::get(),
    [11.1810]
    [11.1810]
    1, // num_cpus::get(),
  • replacement in pijul/src/commands/record.rs at line 333
    [11.107478][11.0:33]()
    num_cpus::get(),
    [11.107478]
    [11.107478]
    1, // num_cpus::get(),
    self.timestamp.unwrap_or(0) as u64,
  • edit in pijul/src/commands/pushpull.rs at line 499
    [11.16940]
    [11.16940]
    0,
  • edit in pijul/src/commands/pushpull.rs at line 516
    [11.17416]
    [11.17416]
    0,
  • replacement in pijul/src/commands/pushpull.rs at line 529
    [11.120988][11.120988:121048]()
    txn.unrecord(&repo.changes, &mut channel, &h)?;
    [11.120988]
    [11.121048]
    txn.unrecord(&repo.changes, &mut channel, &h, 0)?;
  • edit in pijul/src/commands/protocol.rs at line 220
    [11.132573]
    [11.132573]
    0,
  • edit in pijul/src/commands/protocol.rs at line 251
    [11.18376]
    [11.133493]
    0,
  • edit in pijul/src/commands/git.rs at line 474
    [11.2764]
    [11.151462]
    0,
  • replacement in pijul/src/commands/git.rs at line 585
    [11.155663][11.155663:155757]()
    txn.move_file(&old_path, &tmp_path.to_string_lossy())
    [11.155663]
    [11.155757]
    txn.move_file(&old_path, &tmp_path.to_string_lossy(), 0)
  • replacement in pijul/src/commands/git.rs at line 614
    [11.157019][11.157019:157111]()
    if let Err(e) = txn.move_file(&a.to_string_lossy(), &b.to_string_lossy()) {
    [11.157019]
    [11.157111]
    if let Err(e) = txn.move_file(&a.to_string_lossy(), &b.to_string_lossy(), 0) {
  • replacement in pijul/src/commands/git.rs at line 652
    [11.158004][10.531:579]()
    txn_.add_dir(&p).unwrap_or(());
    [11.158004]
    [11.158068]
    txn_.add_dir(&p, 0).unwrap_or(());
  • replacement in pijul/src/commands/git.rs at line 654
    [11.158089][10.580:629]()
    txn_.add_file(&p).unwrap_or(());
    [11.158089]
    [11.158154]
    txn_.add_file(&p, 0).unwrap_or(());
  • edit in pijul/src/commands/git.rs at line 760
    [11.4688]
    [11.4688]
    0,
  • edit in pijul/src/commands/file_operations.rs at line 22
    [11.169338]
    [11.169338]
    salt: Option<u64>,
  • replacement in pijul/src/commands/file_operations.rs at line 65
    [11.261][10.781:831]()
    txn.move_file(&source, &target)?;
    [11.261]
    [11.347]
    txn.move_file(&source, &target, self.salt.unwrap_or(0))?;
  • edit in pijul/src/commands/file_operations.rs at line 122
    [3.58]
    [51.331]
    #[clap(long = "salt")]
    salt: Option<u64>,
  • edit in pijul/src/commands/file_operations.rs at line 159
    [8.272]
    [8.272]
    self.salt.unwrap_or(0),
  • replacement in pijul/src/commands/file_operations.rs at line 171
    [11.17474][11.660:732](),[11.939][11.660:732]()
    if let Err(e) = txn.add(&path_str, meta.is_dir()) {
    [11.17474]
    [11.732]
    if let Err(e) = txn.add(&path_str, meta.is_dir(), self.salt.unwrap_or(0)) {
  • edit in pijul/src/commands/diff.rs at line 65
    [11.354]
    [11.175012]
    0,
  • edit in pijul/src/commands/debug.rs at line 51
    [52.187]
    [11.0]
    ::sanakirja::debug::debug(&txn.txn, &[&txn.tree], "debug.tree", true);
  • edit in pijul/src/commands/clone.rs at line 32
    [11.183797]
    [11.183797]
    salt: Option<u64>,
  • edit in pijul/src/commands/clone.rs at line 103
    [11.22776]
    [11.185766]
    self.salt.unwrap_or(0),
  • edit in pijul/src/commands/archive.rs at line 123
    [11.193775]
    [11.193775]
    0,
  • edit in pijul/src/commands/apply.rs at line 132
    [11.24131]
    [53.3672]
    0,
  • edit in pijul/src/commands/apply.rs at line 145
    [11.24352]
    [53.3988]
    0,
  • replacement in pijul/Cargo.toml at line 68
    [11.197874][11.24530:24588]()
    sanakirja = { version = "1.2.0", features = [ "crc32" ] }
    [11.197874]
    [11.197895]
    sanakirja = { version="1.2", features = [ "crc32" ] }
  • edit in libpijul/src/working_copy/filesystem.rs at line 109
    [11.398]
    [11.27831]
    salt: u64,
  • edit in libpijul/src/working_copy/filesystem.rs at line 123
    [11.610]
    [11.610]
    salt,
  • edit in libpijul/src/working_copy/filesystem.rs at line 135
    [11.835]
    [11.835]
    salt,
  • edit in libpijul/src/working_copy/filesystem.rs at line 147
    [11.875]
    [11.19632]
    salt: u64,
  • replacement in libpijul/src/working_copy/filesystem.rs at line 172
    [11.533][11.533:576]()
    .threads(threads - 1);
    [11.533]
    [11.576]
    .threads((threads - 1).max(1));
  • replacement in libpijul/src/working_copy/filesystem.rs at line 215
    [10.1123][10.1123:1170]()
    match txn.add(&path_str, is_dir) {
    [10.1123]
    [11.1988]
    match txn.add(&path_str, is_dir, salt) {
  • edit in libpijul/src/working_copy/filesystem.rs at line 240
    [11.3130]
    [11.28356]
    salt: u64,
  • replacement in libpijul/src/working_copy/filesystem.rs at line 246
    [8.390][8.390:459]()
    self.add_prefix_rec(txn.clone(), repo_path, full, threads)?;
    [8.390]
    [8.459]
    self.add_prefix_rec(txn.clone(), repo_path, full, threads, salt)?;
  • edit in libpijul/src/unrecord/working_copy.rs at line 34
    [11.226907]
    [11.20170]
    salt: u64,
  • replacement in libpijul/src/unrecord/working_copy.rs at line 42
    [11.6696][11.227286:227344](),[11.227286][11.227286:227344]()
    restore(txn, changes, channel, source, dest)?
    [11.6696]
    [11.227344]
    restore(txn, changes, channel, source, dest, salt)?
  • edit in libpijul/src/unrecord/working_copy.rs at line 57
    [11.227588]
    [11.20458]
    salt: u64,
  • replacement in libpijul/src/unrecord/working_copy.rs at line 64
    [9.92][9.92:181]()
    return_value = restore_inode(txn, changes, source, dest, parent_inode)?;
    [9.92]
    [9.181]
    return_value = restore_inode(txn, changes, source, dest, parent_inode, salt)?;
  • replacement in libpijul/src/unrecord/working_copy.rs at line 87
    [11.228382][9.260:344]()
    return_value = restore_inode(txn, changes, source, dest, Inode::ROOT)?;
    [11.228382]
    [11.14972]
    return_value = restore_inode(txn, changes, source, dest, Inode::ROOT, salt)?;
  • replacement in libpijul/src/unrecord/working_copy.rs at line 89
    [11.15052][9.345:423]()
    return_value = restore_inode(txn, changes, source, dest, inode)?;
    [11.15052]
    [11.228631]
    return_value = restore_inode(txn, changes, source, dest, inode, salt)?;
  • edit in libpijul/src/unrecord/working_copy.rs at line 108
    [11.229088]
    [9.424]
    salt: u64,
  • replacement in libpijul/src/unrecord/working_copy.rs at line 127
    [9.674][9.674:733]()
    let inode = crate::fs::create_new_inode(txn)?;
    [9.674]
    [9.733]
    let inode = crate::fs::create_new_inode(txn, &file_id, salt)?;
  • edit in libpijul/src/unrecord/mod.rs at line 52
    [11.231881]
    [11.22525]
    salt: u64,
  • replacement in libpijul/src/unrecord/mod.rs at line 67
    [11.232252][11.232252:232314]()
    unapply(txn, &mut channel, changes, change_id, &change)?;
    [11.232252]
    [11.232314]
    unapply(txn, &mut channel, changes, change_id, &change, salt)?;
  • edit in libpijul/src/unrecord/mod.rs at line 144
    [11.234187]
    [11.23858]
    salt: u64,
  • replacement in libpijul/src/unrecord/mod.rs at line 197
    [11.530][11.530:628]()
    working_copy::undo_file_deletion(txn, changes, channel, change_id, newedges)?
    [11.372]
    [11.628]
    working_copy::undo_file_deletion(txn, changes, channel, change_id, newedges, salt)?
  • edit in libpijul/src/small_string.rs at line 15
    [11.5571]
    [11.480895]
    }
    impl std::hash::Hash for SmallStr {
    fn hash<H: std::hash::Hasher>(&self, hasher: &mut H) {
    self.as_bytes().hash(hasher)
    }
  • replacement in libpijul/src/pristine/sanakirja.rs at line 256
    [11.537211][11.60250:60280]()
    tree: UDb<PathId, Inode>,
    [11.537211]
    [11.60280]
    pub tree: UDb<PathId, Inode>,
  • replacement in libpijul/src/pristine/sanakirja.rs at line 1409
    [11.50063][11.63626:63728]()
    self.counter += 1;
    debug!("put_graph {:?} {:?}, counter = {:?}", k, e, self.counter);
    [11.50063]
    [11.63728]
    // self.counter += 1;
    // debug!("put_graph {:?} {:?}, counter = {:?}", k, e, self.counter);
  • replacement in libpijul/src/pristine/sanakirja.rs at line 1440
    [11.50114][11.64394:64496]()
    self.counter += 1;
    debug!("del_graph {:?} {:?}, counter = {:?}", k, e, self.counter);
    [11.50114]
    [11.64496]
    // self.counter += 1;
    // debug!("del_graph {:?} {:?}, counter = {:?}", k, e, self.counter);
  • replacement in libpijul/src/pristine/path_id.rs at line 25
    [11.585663][4.0:42]()
    #[derive(Eq, PartialEq, Ord, PartialOrd)]
    [11.585663]
    [11.585725]
    #[derive(Hash, Eq, PartialEq, Ord, PartialOrd)]
  • edit in libpijul/src/pristine/mod.rs at line 855
    [11.43055][11.43055:43074]()
    use rand::Rng;
  • replacement in libpijul/src/pristine/mod.rs at line 857
    [11.65135][11.104827:104905]()
    Hash::Blake3(ref s) => ChangeId(L64(LittleEndian::read_u64(&s[..]))),
    [11.65135]
    [11.43218]
    Hash::Blake3(ref s) => LittleEndian::read_u64(&s[..]),
  • replacement in libpijul/src/pristine/mod.rs at line 859
    [11.43225][11.104906:104956]()
    while let Some(ext) = txn.get_external(&p)? {
    [11.43225]
    [11.104956]
    let mut pp = ChangeId(L64(p));
    while let Some(ext) = txn.get_external(&pp)? {
  • replacement in libpijul/src/pristine/mod.rs at line 862
    [11.104991][11.104991:105044]()
    p = ChangeId(L64(rand::thread_rng().gen()));
    [11.104991]
    [11.608586]
    p = u64::from_le(p) + 1;
    pp = ChangeId(L64(p.to_le()));
  • replacement in libpijul/src/pristine/mod.rs at line 865
    [11.608592][11.65180:65190]()
    Ok(p)
    [11.608592]
    [11.43322]
    Ok(pp)
  • replacement in libpijul/src/pristine/inode.rs at line 5
    [11.643870][11.114645:114699]()
    pub struct Inode(pub(in crate::pristine) super::L64);
    [11.643870]
    [11.643917]
    pub struct Inode(pub(in crate) super::L64);
    use byteorder::{ByteOrder, BigEndian};
  • replacement in libpijul/src/pristine/inode.rs at line 11
    [11.644100][11.114700:114736]()
    self.0.to_slice_le(&mut b);
    [11.644100]
    [11.644149]
    BigEndian::write_u64(&mut b, (self.0).0); // self.0.to_slice_le(&mut b);
  • edit in libpijul/src/pristine/inode.rs at line 20
    [11.644347][11.644347:644390](),[11.644390][11.114784:114819]()
    }
    pub(crate) fn random() -> Self {
    Inode(L64(rand::random()))
  • edit in libpijul/src/output/output.rs at line 45
    [11.73759]
    [11.73759]
    salt: u64,
  • edit in libpijul/src/output/output.rs at line 60
    [11.73919]
    [11.673474]
    salt,
  • edit in libpijul/src/output/output.rs at line 132
    [11.75806]
    [11.75806]
    salt: u64,
  • edit in libpijul/src/output/output.rs at line 275
    [11.677608]
    [11.677608]
    salt,
  • edit in libpijul/src/output/output.rs at line 375
    [11.679880]
    [11.82954]
    salt: u64,
  • replacement in libpijul/src/output/output.rs at line 399
    [11.680955][11.680955:681136](),[11.681136][11.0:40](),[11.40][11.681136:681168](),[11.681136][11.681136:681168]()
    use rand::Rng;
    let s: String = rand::thread_rng()
    .sample_iter(&rand::distributions::Alphanumeric)
    .take(30)
    .map(|c| c as char)
    .collect();
    [11.680955]
    [11.681168]
    let s = {
    let mut c = [0u8; 16];
    unsafe {
    *(c.as_mut_ptr() as *mut Position<ChangeId>) = output_item.pos
    }
    data_encoding::BASE32_NOPAD.encode(blake3::hash(&c).as_bytes())
    };
  • edit in libpijul/src/output/output.rs at line 408
    [11.681222][11.681222:681223]()
  • edit in libpijul/src/output/output.rs at line 410
    [11.21451]
    [6.1185]
  • replacement in libpijul/src/output/output.rs at line 445
    [11.682538][11.81033:81084]()
    let inode = create_new_inode(&mut *txn_)?;
    [11.682538]
    [11.682581]
    let inode = create_new_inode(&mut *txn_, &file_id, salt)?;
  • edit in libpijul/src/lib.rs at line 107
    [11.83668]
    [11.83668]
    pub type Hasher = std::hash::BuildHasherDefault<twox_hash::XxHash64>;
  • replacement in libpijul/src/lib.rs at line 109
    [11.83693][11.83693:83782]()
    std::collections::HashMap<K, V, std::hash::BuildHasherDefault<twox_hash::XxHash64>>;
    [11.83693]
    [11.83782]
    std::collections::HashMap<K, V, Hasher>;
  • replacement in libpijul/src/lib.rs at line 111
    [11.83804][11.83804:83890]()
    std::collections::HashSet<K, std::hash::BuildHasherDefault<twox_hash::XxHash64>>;
    [11.83804]
    [11.83890]
    std::collections::HashSet<K, Hasher>;
  • edit in libpijul/src/lib.rs at line 288
    [11.725363]
    [11.94606]
    salt: u64,
  • replacement in libpijul/src/lib.rs at line 290
    [11.28778][11.725402:725459](),[11.94683][11.725402:725459](),[11.725402][11.725402:725459]()
    unrecord::unrecord(self, channel, changes, hash)
    [11.94683]
    [11.725459]
    unrecord::unrecord(self, channel, changes, hash, salt)
  • replacement in libpijul/src/lib.rs at line 319
    [11.726194][11.94789:94875](),[11.28956][11.726264:726311](),[11.94875][11.726264:726311](),[11.726264][11.726264:726311]()
    fn add_file(&mut self, path: &str) -> Result<(), fs::FsError<Self::GraphError>> {
    fs::add_inode(self, None, path, false)
    [11.726194]
    [11.726311]
    fn add_file(&mut self, path: &str, salt: u64) -> Result<(), fs::FsError<Self::GraphError>> {
    fs::add_inode(self, None, path, false, salt)
  • replacement in libpijul/src/lib.rs at line 327
    [11.726545][11.94876:94961](),[11.29037][11.726614:726660](),[11.94961][11.726614:726660](),[11.726614][11.726614:726660]()
    fn add_dir(&mut self, path: &str) -> Result<(), fs::FsError<Self::GraphError>> {
    fs::add_inode(self, None, path, true)
    [11.726545]
    [11.726660]
    fn add_dir(&mut self, path: &str, salt: u64) -> Result<(), fs::FsError<Self::GraphError>> {
    fs::add_inode(self, None, path, true, salt)
  • replacement in libpijul/src/lib.rs at line 334
    [11.726871][11.94962:95057](),[11.29128][11.726950:726998](),[11.95057][11.726950:726998](),[11.726950][11.726950:726998]()
    fn add(&mut self, path: &str, is_dir: bool) -> Result<(), fs::FsError<Self::GraphError>> {
    fs::add_inode(self, None, path, is_dir)
    [11.726871]
    [11.726998]
    fn add(&mut self, path: &str, is_dir: bool, salt: u64) -> Result<(), fs::FsError<Self::GraphError>> {
    fs::add_inode(self, None, path, is_dir, salt)
  • replacement in libpijul/src/lib.rs at line 338
    [11.727005][11.95058:95151](),[11.29217][11.727082:727116](),[11.95151][11.727082:727116](),[11.727082][11.727082:727116]()
    fn move_file(&mut self, a: &str, b: &str) -> Result<(), fs::FsError<Self::GraphError>> {
    fs::move_file(self, a, b)
    [11.727005]
    [11.727116]
    fn move_file(&mut self, a: &str, b: &str, salt: u64) -> Result<(), fs::FsError<Self::GraphError>> {
    fs::move_file(self, a, b, salt)
  • edit in libpijul/src/lib.rs at line 353
    [11.728008]
    [11.95357]
    salt: u64,
  • edit in libpijul/src/lib.rs at line 363
    [11.728239]
    [11.728239]
    salt,
  • edit in libpijul/src/lib.rs at line 383
    [11.728757]
    [11.95463]
    salt: u64,
  • replacement in libpijul/src/lib.rs at line 402
    [11.95738][11.729279:729333](),[11.126591][11.729279:729333](),[11.729279][11.729279:729333]()
    self.unrecord(changes, channel, &h)?;
    [11.126591]
    [11.729333]
    self.unrecord(changes, channel, &h, salt)?;
  • replacement in libpijul/src/fs.rs at line 61
    [11.30675][11.102288:102389](),[11.102389][11.738608:738741](),[11.738608][11.738608:738741](),[11.738741][11.129467:129533]()
    pub(crate) fn create_new_inode<T: TreeMutTxnT>(txn: &mut T) -> Result<Inode, TxnErr<T::TreeError>> {
    let mut already_taken = true;
    let mut inode: Inode = Inode::ROOT;
    while already_taken {
    inode = Inode::random();
    already_taken = txn.get_revtree(&inode, None)?.is_some();
    [11.30675]
    [11.738805]
    pub(crate) fn create_new_inode<T: TreeMutTxnT>(txn: &mut T, parent_id: &PathId, salt: u64) -> Result<Inode, TxnErr<T::TreeError>> {
    use std::hash::{BuildHasher, Hash, Hasher};
    let mut s = crate::Hasher::default().build_hasher();
    (parent_id, salt).hash(&mut s);
    let mut i: u64 = s.finish();
    let mut inode = Inode(L64(i.to_le()));
    while txn.get_revtree(&inode, None)?.is_some() {
    i += 1;
    inode = Inode(L64(i.to_le()));
  • edit in libpijul/src/fs.rs at line 191
    [11.742759]
    [11.103713]
    salt: u64,
  • replacement in libpijul/src/fs.rs at line 217
    [11.744073][11.104107:104151]()
    None => create_new_inode(txn)?,
    [11.744073]
    [11.744116]
    None => create_new_inode(txn, &parent_id, salt)?,
  • edit in libpijul/src/fs.rs at line 239
    [11.744782]
    [11.104327]
    salt: u64,
  • replacement in libpijul/src/fs.rs at line 248
    [11.745165][11.3341:3421]()
    current_inode = make_new_child(txn, current_inode, c, true, None)?;
    [11.745165]
    [11.745244]
    current_inode = make_new_child(txn, current_inode, c, true, None, salt)?;
  • replacement in libpijul/src/fs.rs at line 252
    [11.745375][11.745375:745446]()
    make_new_child(txn, current_inode, file_name, is_dir, inode)?;
    [11.745375]
    [11.745446]
    make_new_child(txn, current_inode, file_name, is_dir, inode, salt)?;
  • edit in libpijul/src/fs.rs at line 266
    [11.745846]
    [11.104492]
    salt: u64,
  • replacement in libpijul/src/fs.rs at line 269
    [11.745932][11.745932:746001]()
    move_file_by_inode(txn, find_inode(txn, origin)?, destination)?;
    [11.745932]
    [11.746001]
    move_file_by_inode(txn, find_inode(txn, origin)?, destination, salt)?;
  • edit in libpijul/src/fs.rs at line 277
    [11.746112]
    [11.104578]
    salt: u64,
  • replacement in libpijul/src/fs.rs at line 292
    [11.746800][11.746800:746855]()
    add_inode(txn, Some(inode), destination, is_dir)?;
    [11.746800]
    [11.746855]
    add_inode(txn, Some(inode), destination, is_dir, salt)?;
  • edit in libpijul/src/apply.rs at line 353
    [11.3408]
    [11.7939]
  • replacement in libpijul/Cargo.toml at line 97
    [11.1022980][5.0:58]()
    sanakirja = { version = "1.2.0", features = [ "crc32" ] }
    [11.1022980]
    [11.1023001]
    sanakirja = { version = "1.2", features = [ "crc32" ] }
  • edit in libpijul/Cargo.toml at line 104
    [11.1023116][11.91:104]()
    rand = "0.8"
  • edit in Cargo.lock at line 952
    [11.1055747][11.118058:118073]()
    "rand 0.8.3",