Backwards-compatibility: moving old paths to the new "roots" feature

pmeunier
Nov 23, 2021, 11:55 AM
QAXLX3UAV6R66K2GERT7FJBPNULWAUSO3DFME3CLEZDBG55I4IRAC

Dependencies

  • [2] ENWJBQGQ Fixing a deprecation warning in ed25519_dalek.
  • [3] DJYHARZ7 Skipping old files when recording
  • [4] CCFJ7VO3 Renaming "Record" to "Hunk" in the changes
  • [5] FXEDPLRI Resurrecting tests, and type cleanup (no need for Arc<RwLock<…>> anymore)
  • [6] X243Z3Y5 Recording only the required metadata (can even be changed later!)
  • [7] YN63NUZO Sanakirja 1.0
  • [8] ZSF3YFZT encoded file deletion
  • [9] YTQS4ES3 Fixing a parsing problem (related to permissions), and the associated permissions
  • [10] EEBKW7VT Keys and identities
  • [11] RMDMAYRX Adding a root inode (aka supporting submodules)
  • [12] HYRH4E55 rustfmt.toml: init
  • [13] YE5WBHXB Fixing contrib permissions
  • [14] QDP3R3BG Updating with the latest Sanakirja
  • [15] A3RM526Y Integrating identity malleability
  • [16] TNN56XYK libpijul alpha.43
  • [17] CCLLB7OI Upgrading to Sanakirja 0.15 + version bump
  • [18] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [19] FGIVSUFH Fixing conflicts with the new patch parsing code, and introducing AddRoot
  • [20] VKBJ6XB6 Formatting and version bump
  • [21] DJ5JYH3K COPYING
  • [22] QQZNSB26 Permission update (after #X243)
  • [23] LERRJNFC Fixing the text change version of "FileMove" to include the former path
  • [24] RRCSHAYZ Formatting
  • [25] HSEYMLO2 Adding an untracked change iterator
  • [26] TVVW53HZ Conflict resolution
  • [27] SL45MHGV +contrib/pijul2svg.sh (license as usual: GPL-2.0-or-later)
  • [28] I24UEJQL Various post-fire fixes
  • [29] 3S6LU2U5 abstract out FileMetadata (de)serialistion
  • [30] HDGRZISM Version updates
  • [31] G734WNM6 flake.nix: use crate2nix
  • [32] ADPAFSMY Proper old metadata when recording
  • [33] OU243LAB Support for staging
  • [34] SGXOEWHU Adding a patched chardetng (temporarily)

Change contents

  • file move: shell.nix (----------)shell.nix (----------)
    [2.2]
    [3.12]
  • file move: rustfmt.toml (----------)rustfmt.toml (----------)
    [2.2]
    [3.15]
  • file move: pijul-macros (d--r------)pijul-macros (d--r------)
    [2.2]
    [3.428]
  • file move: pijul (d--r------)pijul (d--r------)
    [2.2]
    [3.21407]
  • replacement in libpijul/src/record.rs at line 73
    [3.41156][3.1012:1062]()
    new_root: Arc<Mutex<Option<ChangePosition>>>,
    [3.41156]
    [3.489652]
    new_root: Arc<Mutex<Option<(Position<Option<ChangeId>>, u64)>>>,
  • replacement in libpijul/src/record.rs at line 106
    [3.41498][3.1063:1113]()
    new_root: Arc<Mutex<Option<ChangePosition>>>,
    [3.41498]
    [3.490405]
    new_root: Arc<Mutex<Option<(Position<Option<ChangeId>>, u64)>>>,
  • replacement in libpijul/src/record.rs at line 366
    [3.1301][3.1301:1362]()
    // Test for a "root" vertex below the 0 one.
    [3.1301]
    [3.1362]
    // Test for a "root" vertex below the null one.
  • edit in libpijul/src/record.rs at line 464
    [3.3710]
    [3.3710]
    if !vertex.change.is_root() {
    let mut r = self.new_root.lock();
    let age = txn.get_changeset(txn.changes(&*channel), &vertex.change)?.unwrap();
    if let Some((_, a)) = *r {
    if a < (*age).into() {
    *r = Some((vertex.to_option(), (*age).into()))
    }
    } else {
    *r = Some((vertex.to_option(), (*age).into()))
    }
    }
  • replacement in libpijul/src/record.rs at line 724
    [3.4889][3.4889:4979]()
    if let Some(pos) = *new_root {
    Position { change: None, pos }
    [3.4889]
    [3.4979]
    if let Some((pos, _)) = *new_root {
    pos
  • replacement in libpijul/src/record.rs at line 742
    [3.8170][3.5699:5793](),[3.5699][3.5699:5793](),[3.5793][3.8171:8204](),[3.8204][3.5832:5860](),[3.5832][3.5832:5860]()
    up_context: vec![Position {
    change: None,
    pos,
    }],
    [3.8170]
    [3.5860]
    up_context: vec![Position { change: None, pos }],
  • replacement in libpijul/src/record.rs at line 751
    [3.8279][3.8279:8412]()
    self.updatables
    .insert(self.actions.len(), InodeUpdate::Add { inode: Inode::ROOT, pos: pos2 });
    [3.8279]
    [3.8412]
    self.updatables.insert(
    self.actions.len(),
    InodeUpdate::Add {
    inode: Inode::ROOT,
    pos: pos2,
    },
    );
  • replacement in libpijul/src/record.rs at line 759
    [3.8413][3.8413:8506]()
    *new_root = Some(pos2);
    Position { change: None, pos: pos2 }
    [3.8413]
    [3.6328]
    *new_root = Some((Position { change: None, pos: pos2 }, u64::MAX));
    Position {
    change: None,
    pos: pos2,
    }
  • edit in libpijul/src/record.rs at line 1026
    [3.10067][3.98271:98320](),[3.48][3.98271:98320]()
    let mut contents = self.contents.lock();
  • edit in libpijul/src/record.rs at line 1027
    [3.498][3.1581:1645](),[3.1645][3.571:653](),[3.571][3.571:653](),[3.653][3.2780:2820](),[3.2820][3.653:663](),[3.653][3.653:663](),[3.663][3.1646:1739]()
    let meta_start = ChangePosition(contents.len().into());
    FileMetadata {
    metadata: item.metadata,
    basename,
    encoding: encoding.clone(),
    }
    .write(&mut contents);
    let meta_end = ChangePosition(contents.len().into());
  • replacement in libpijul/src/record.rs at line 1049
    [3.509220][3.2821:2847]()
    encoding,
    [3.509220]
    [3.509220]
    encoding: encoding.clone(),
  • edit in libpijul/src/record.rs at line 1051
    [3.509236]
    [3.509236]
    }
    let item_v_papa = if !moved.edges.is_empty()
    && moved.need_new_name
    {
    self.add_root_if_needed(item.v_papa)
    } else {
    item.v_papa
    };
    let mut contents = self.contents.lock();
    let meta_start = ChangePosition(contents.len().into());
    FileMetadata {
    metadata: item.metadata,
    basename,
    encoding: encoding.clone(),
  • edit in libpijul/src/record.rs at line 1068
    [3.509246]
    [3.509247]
    .write(&mut contents);
    let meta_end = ChangePosition(contents.len().into());
  • edit in libpijul/src/record.rs at line 1072
    [3.509321]
    [3.60611]
    debug!("need_new_name {:?}", item.v_papa);
  • replacement in libpijul/src/record.rs at line 1079
    [3.509592][3.509592:509647]()
    up_context: vec![item.v_papa],
    [3.509592]
    [3.509647]
    up_context: vec![item_v_papa],
  • replacement in libpijul/src/record.rs at line 1084
    [3.509861][3.509861:509905]()
    inode: item.v_papa,
    [3.509861]
    [3.509905]
    inode: item_v_papa,
  • replacement in libpijul/src/key.rs at line 226
    [3.39592][2.23:104]()
    let signature = ed25519_dalek::Signature::from_bytes(signature);
    [3.39592]
    [3.12600]
    let signature = ed25519_dalek::Signature::from_bytes(&signature)?;
  • replacement in libpijul/src/key.rs at line 273
    [3.39977][2.105:174]()
    let sig = ed25519_dalek::Signature::from_bytes(sig);
    [3.39977]
    [3.39978]
    let sig = ed25519_dalek::Signature::from_bytes(&sig)?;
  • file move: flake.nix (----------)flake.nix (----------)
    [2.2]
    [3.1023754]
  • file move: flake.lock (----------)flake.lock (----------)
    [2.2]
    [3.1026237]
  • file move: default.nix (----------)default.nix (----------)
    [2.2]
    [3.248538]
  • file move: contrib (d--r------)contrib (d--r------)
    [2.2]
    [3.10]
  • file move: README.md (----------)README.md (----------)
    [2.2]
    [3.1026818]
  • file move: Cargo.toml (----------)Cargo.toml (----------)
    [2.2]
    [3.1030188]
  • file move: Cargo.nix (----------)Cargo.nix (----------)
    [2.2]
    [3.12]
  • file move: Cargo.lock (----------)Cargo.lock (----------)
    [2.2]
    [3.1030385]
  • file move: COPYING (----------)COPYING (----------)
    [2.2]
    [3.10]
  • file move: .ignore (----------).ignore (----------)
    [2.2]
    [3.1]