Pulling local tags

pmeunier
Jan 5, 2022, 4:42 PM
ZWVYH7WPYOGDKWODFSAJ6R5U64DON2AVVJ2XZJKHAOMLJEFTYF3QC

Dependencies

  • [2] DO2Y5TY5 Tag synchronisation
  • [3] TKEVOH7H Fixing a bug when downloading changes, and making change download more efficient (more async)
  • [4] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [5] BNPSVXIC Friendlier progress bars
  • [6] CCLLB7OI Upgrading to Sanakirja 0.15 + version bump
  • [7] UDHP4ZVB Fixing SSH asynchronicity issues
  • [8] YN63NUZO Sanakirja 1.0
  • [9] X6YFD4WV Do not download changes if we already have them

Change contents

  • replacement in pijul/src/remote/mod.rs at line 1085
    [3.259][2.16151:16450]()
    if let CS::Change(h) = h {
    libpijul::changestore::filesystem::push_filename(&mut change_path_, h);
    if std::fs::metadata(&change_path_).is_err() {
    hash_send.send(CS::Change(*h))?;
    to_download.insert(CS::Change(*h));
    [3.259]
    [2.16450]
    match h {
    CS::Change(h) => {
    libpijul::changestore::filesystem::push_filename(&mut change_path_, h);
    }
    CS::State(h) => {
    libpijul::changestore::filesystem::push_tag_filename(&mut change_path_, h);
  • replacement in pijul/src/remote/mod.rs at line 1092
    [2.16468][2.16468:16552]()
    libpijul::changestore::filesystem::pop_filename(&mut change_path_);
    [2.16468]
    [3.440]
    }
    if std::fs::metadata(&change_path_).is_err() {
    hash_send.send(*h)?;
    to_download.insert(*h);
  • edit in pijul/src/remote/mod.rs at line 1097
    [3.454]
    [3.534]
    libpijul::changestore::filesystem::pop_filename(&mut change_path_);
  • replacement in pijul/src/remote/mod.rs at line 1308
    [3.76104][2.18534:18666]()
    let c = if let CS::Change(c) = c {
    c
    } else {
    unreachable!()
    };
    [3.76104]
    [3.7945]
    let c = if let CS::Change(c) = c { c } else { continue };
  • replacement in pijul/src/remote/local.rs at line 201
    [3.2892][2.22380:22880]()
    if let CS::Change(c) = c {
    libpijul::changestore::filesystem::push_filename(&mut self.changes_dir, &c);
    libpijul::changestore::filesystem::push_filename(&mut path, &c);
    super::PROGRESS.borrow_mut().unwrap()[pro_n].incr();
    if std::fs::metadata(&path).is_ok() {
    debug!("metadata {:?} ok", path);
    libpijul::changestore::filesystem::pop_filename(&mut path);
    continue;
    [3.2892]
    [2.22880]
    match c {
    CS::Change(c) => {
    libpijul::changestore::filesystem::push_filename(&mut self.changes_dir, &c);
    libpijul::changestore::filesystem::push_filename(&mut path, &c);
  • replacement in pijul/src/remote/local.rs at line 206
    [2.22898][2.22898:23102]()
    std::fs::create_dir_all(&path.parent().unwrap())?;
    if std::fs::hard_link(&self.changes_dir, &path).is_err() {
    std::fs::copy(&self.changes_dir, &path)?;
    [2.22898]
    [2.23102]
    CS::State(c) => {
    libpijul::changestore::filesystem::push_tag_filename(&mut self.changes_dir, &c);
    libpijul::changestore::filesystem::push_tag_filename(&mut path, &c);
  • replacement in pijul/src/remote/local.rs at line 210
    [2.23120][2.23120:23250]()
    debug!("hard link done");
    libpijul::changestore::filesystem::pop_filename(&mut self.changes_dir);
    [2.23120]
    [3.12157]
    }
    super::PROGRESS.borrow_mut().unwrap()[pro_n].incr();
    if std::fs::metadata(&path).is_ok() {
    debug!("metadata {:?} ok", path);
  • edit in pijul/src/remote/local.rs at line 215
    [3.12233]
    [3.12464]
    continue;
    }
    std::fs::create_dir_all(&path.parent().unwrap())?;
    if std::fs::hard_link(&self.changes_dir, &path).is_err() {
    std::fs::copy(&self.changes_dir, &path)?;
  • edit in pijul/src/remote/local.rs at line 221
    [3.12478]
    [3.12672]
    debug!("hard link done");
    libpijul::changestore::filesystem::pop_filename(&mut self.changes_dir);
    libpijul::changestore::filesystem::pop_filename(&mut path);