handle errs in repo::get_inodes

tzemanovic
Apr 1, 2026, 4:35 PM
B5ZHS2HVQ7WC2T2P226NKSO7CR5IHGBV6CVOO2XJPMWRKOKZ75WQC

Dependencies

Change contents

  • replacement in libflorescence/src/repo.rs at line 1366
    [2.858][2.858:910]()
    let inodes = get_inodes(&txn, &repo.path, &[]);
    [2.858]
    [2.910]
    let inodes = get_inodes(&txn, &repo.path, &[]).context("getting inodes")?;
  • replacement in libflorescence/src/repo.rs at line 1992
    [2.2844][2.2844:2934]()
    ) -> Vec<(
    pijul::Inode,
    Option<pijul::pristine::Position<pijul::ChangeId>>,
    )> {
    [2.2844]
    [2.2934]
    ) -> anyhow::Result<
    Vec<(
    pijul::Inode,
    Option<pijul::pristine::Position<pijul::ChangeId>>,
    )>,
    > {
  • replacement in libflorescence/src/repo.rs at line 2002
    [2.3128][2.3128:3216]()
    // return Err(Error::NotFound(pat.to_string()))
    todo!()
    [2.3128]
    [2.3216]
    bail!("Path {pat:?} not found {e:?}")
  • replacement in libflorescence/src/repo.rs at line 2004
    [2.3230][4.6:29](),[4.29][2.3252:3327](),[2.3252][2.3252:3327]()
    Err(_e) =>
    // return Err(e.into()),
    {
    todo!()
    [2.3230]
    [2.3327]
    Err(e) => {
    bail!("Path {pat:?} error: {e:?}")
  • replacement in libflorescence/src/repo.rs at line 2014
    [2.3644][2.3644:3903]()
    Err(_) => {
    // return Err(Error::FilterPath {
    // pat: pat.to_string(),
    // canon_path,
    // repo_path: repo_path.to_path_buf(),
    // })
    todo!()
    [2.3644]
    [2.3903]
    Err(e) => {
    bail!("Strip path prefix failed with {e:?}")
  • replacement in libflorescence/src/repo.rs at line 2019
    [3.582][2.3999:4125](),[2.3999][2.3999:4125]()
    Ok(None) =>
    // return Err(Error::InvalidUtf8(pat.to_string())),
    {
    todo!()
    [3.582]
    [2.4125]
    Ok(None) => {
    bail!("Invalid UTF8 {pat:?}")
  • replacement in libflorescence/src/repo.rs at line 2023
    [2.4168][2.4168:4242]()
    let inode = pijul::fs::find_inode(txn, s).expect("TODO");
    [2.4168]
    [2.4242]
    let inode = pijul::fs::find_inode(txn, s)
    .with_context(|| format!("find inode {s:?}"))?;
  • replacement in libflorescence/src/repo.rs at line 2027
    [2.4346][2.4346:4387]()
    .expect("TODO");
    [2.4346]
    [2.4387]
    .with_context(|| format!("get inode position {s:?}"))?;
  • replacement in libflorescence/src/repo.rs at line 2032
    [2.4480][2.4480:4491]()
    inodes
    [2.4480]
    [2.4491]
    Ok(inodes)