Avoid recording hunks with Pseudo|Folder edges, since they are invalid for unrecord (and useless)

pmeunier
Jun 25, 2023, 7:50 PM
42JP3JSRMBDUC536BKKIJ3JDCEV6Y5T4Y7GFCPZ7DWNSRCCEF75AC

Dependencies

  • [2] LRIUJWCR Recording files with multiple names (some files were given no name at all)
  • [3] I7RXYOWK Fixing a panic when printing name conflict resolutions
  • [4] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [5] SAADQM3H Finer-grained detection of metadata on Windows
  • [6] A6WKPB55 Detecting (and recording) conflicts between multiple equal names for the same file
  • [7] YN63NUZO Sanakirja 1.0

Change contents

  • replacement in libpijul/src/record.rs at line 1649
    [4.209][4.515867:515910](),[4.614][4.515867:515910](),[4.515867][4.515867:515910](),[4.515910][3.0:85](),[3.85][4.515973:516058](),[4.53256][4.515973:516058](),[4.515973][4.515973:516058](),[4.516058][4.53257:53315](),[4.53315][4.516114:516163](),[4.516114][4.516114:516163](),[4.516163][4.53316:53386](),[4.53386][4.516231:516251](),[4.516231][4.516231:516251](),[4.516251][2.166:519](),[2.519][4.53387:53478](),[4.516334][4.53387:53478](),[4.53478][4.516423:516470](),[4.516423][4.516423:516470](),[4.516470][4.53479:53548](),[4.53548][4.516537:516605](),[4.516537][4.516537:516605](),[4.516605][4.53549:53606](),[4.53606][4.516660:516728](),[4.516660][4.516660:516728](),[4.516728][4.53607:53676](),[4.53676][4.516795:516818](),[4.516795][4.516795:516818]()
    moved.edges.push(NewEdge {
    previous: parent.flag() - EdgeFlags::PARENT - EdgeFlags::PSEUDO,
    flag: EdgeFlags::FOLDER | EdgeFlags::BLOCK | EdgeFlags::DELETED,
    from: grandparent.dest().to_option(),
    to: parent_dest.to_option(),
    introduced_by: Some(grandparent.introduced_by()),
    });
    // The following extra edge is meant to allow
    // detection of missing contexts in folders: indeed,
    // if we didn't have it, we couldn't tell the
    // difference between a convergent renaming or
    // deletion and a conflict between a renaming and a
    // deletion.
    if !parent_was_resurrected && !parent.flag().contains(EdgeFlags::PSEUDO) {
    moved.alive.push(NewEdge {
    previous: parent.flag() - EdgeFlags::PARENT,
    flag: EdgeFlags::FOLDER | EdgeFlags::BLOCK,
    from: parent.dest().to_option(),
    to: current_pos.inode_vertex().to_option(),
    introduced_by: Some(parent.introduced_by()),
    })
    [4.209]
    [4.516818]
    if !parent.flag().contains(EdgeFlags::PSEUDO) {
    moved.edges.push(NewEdge {
    previous: parent.flag() - EdgeFlags::PARENT - EdgeFlags::PSEUDO,
    flag: EdgeFlags::FOLDER | EdgeFlags::BLOCK | EdgeFlags::DELETED,
    from: grandparent.dest().to_option(),
    to: parent_dest.to_option(),
    introduced_by: Some(grandparent.introduced_by()),
    });
    // The following extra edge is meant to allow
    // detection of missing contexts in folders: indeed,
    // if we didn't have it, we couldn't tell the
    // difference between a convergent renaming or
    // deletion and a conflict between a renaming and a
    // deletion.\
    if !parent_was_resurrected {
    moved.alive.push(NewEdge {
    previous: parent.flag() - EdgeFlags::PARENT,
    flag: EdgeFlags::FOLDER | EdgeFlags::BLOCK,
    from: parent.dest().to_option(),
    to: current_pos.inode_vertex().to_option(),
    introduced_by: Some(parent.introduced_by()),
    })
    }