Apply: proper error message when the change is not found
[?]
May 6, 2021, 6:00 AM
TYTQGSKZTHRGBOD6HQGK3VWWPXYXT5JONXYOV65ZO4O3HT7MBUNQCDependencies
- [2]
YN63NUZOSanakirja 1.0 - [3]
R3H7D42UDebugging `pijul git`: proper error reporting - [4]
5SLOJYHGFixing the Git feature - [5]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting).
Change contents
- replacement in pijul/src/commands/apply.rs at line 45
let change = libpijul::change::Change::deserialize(&ch, None)?;let change = libpijul::change::Change::deserialize(&ch, None);let change = match change {Ok(change) => change,Err(libpijul::change::ChangeError::Io(e)) => {if let std::io::ErrorKind::NotFound = e.kind() {let extra = if std::path::Path::new(&ch).is_relative() {" Using the full path to the change file may help."} else {""};bail!("File {} not found, and not recognised as a prefix of a known change identifier.{}", ch, extra)} else {return Err(e.into())}}Err(e) => return Err(e.into())}; - replacement in pijul/src/commands/apply.rs at line 79
txn.apply_change_rec(&repo.changes, &mut channel, hash)?;txn.apply_change_rec(&repo.changes, &mut channel, hash)?