Turning a panic into an error when making a patch
Dependencies
- [2]
ZDK3GNDBTag transactions (including a massive refactoring of errors) - [3]
I52XSRUHMassive cleanup, and simplification - [4]
5FI6SBEZRe-implement change printing and parsing - [5]
UNZXTNSJChange text format: order dependencies in the order they were on the channel at record time - [6]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [7]
GHO6DWPIRefactoring iterators - [8]
I24UEJQLVarious post-fire fixes - [9]
SMMBFECLConverting to the new patch format "online" - [10]
FXEDPLRIResurrecting tests, and type cleanup (no need for Arc<RwLock<…>> anymore) - [11]
YN63NUZOSanakirja 1.0 - [12]
NUAOEIXMAdding inode and byte to Local - [13]
VO5OQW4WRemoving anyhow in libpijul - [14]
CCFJ7VO3Renaming "Record" to "Hunk" in the changes - [15]
UN2M77YUTest new changes against the old code. Fix several small bugs. - [16]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [*]
A3RM526YIntegrating identity malleability - [*]
73NW2X2MReturning a parse error instead of panicking when parsing a text change
Change contents
- replacement in libpijul/src/record.rs at line 1379
TxnErr<T::GraphError>,crate::change::MakeChangeError<T>, - replacement in libpijul/src/change.rs at line 211
) -> Result<(Vec<Hash>, Vec<Hash>), TxnErr<T::DepsError>> {) -> Result<(Vec<Hash>, Vec<Hash>), MakeChangeError<T>> { - replacement in libpijul/src/change.rs at line 292
) -> Result<(), TxnErr<T::GraphError>> {) -> Result<(), MakeChangeError<T>> { - replacement in libpijul/src/change.rs at line 301
let from = txn.find_block_end(channel, e_from).unwrap();let from = if let Ok(from) = txn.find_block_end(channel, e_from) {from} else {return Err(MakeChangeError::InvalidChange)}; - replacement in libpijul/src/change.rs at line 331
) -> Result<(), TxnErr<T::GraphError>> {) -> Result<(), MakeChangeError<T>> { - replacement in libpijul/src/change.rs at line 340
let mut to = txn.find_block(channel, to_pos).unwrap();let mut to = if let Ok(to) = txn.find_block(channel, to_pos) {to} else {return Err(MakeChangeError::InvalidChange)}; - edit in libpijul/src/change.rs at line 1319
#[derive(Error)]pub enum MakeChangeError<T: GraphTxnT> {#[error(transparent)]Graph(#[from] TxnErr<<T as GraphTxnT>::GraphError>),#[error("Invalid change")]InvalidChange,}impl<T: GraphTxnT> std::fmt::Debug for MakeChangeError<T> {fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {match self {MakeChangeError::Graph(e) => std::fmt::Debug::fmt(e, fmt),MakeChangeError::InvalidChange => std::fmt::Debug::fmt("InvalidChange", fmt),}}} - replacement in libpijul/src/change.rs at line 1346
) -> Result<Self, TxnErr<T::DepsError>> {) -> Result<Self, MakeChangeError<T>> { - edit in libpijul/src/change/text_changes.rs at line 22[19.127][3.38343]
}#[derive(Debug, Error)]pub enum TextDeErrorDeps<T: GraphTxnT> {#[error(transparent)]TextDe(#[from] TextDeError),#[error(transparent)]MakeChange(#[from]MakeChangeError<T>), - replacement in libpijul/src/change/text_changes.rs at line 200
) -> Result<Self, TextDeError> {) -> Result<Self, TextDeErrorDeps<T>> { - replacement in libpijul/src/change/text_changes.rs at line 203
dependencies(txn, &channel.read(), change.hashed.changes.iter()).unwrap();dependencies(txn, &channel.read(), change.hashed.changes.iter())?; - edit in libpijul/src/apply.rs at line 17
MakeChange(crate::change::MakeChangeError<T>), - edit in libpijul/src/apply.rs at line 25
ApplyError::MakeChange(e) => std::fmt::Debug::fmt(e, fmt), - edit in libpijul/src/apply.rs at line 35
ApplyError::MakeChange(e) => std::fmt::Display::fmt(e, fmt), - edit in libpijul/src/apply.rs at line 94
impl<C: std::error::Error, T: GraphTxnT + TreeTxnT> From<crate::change::MakeChangeError<T>>for ApplyError<C, T>{fn from(err: crate::change::MakeChangeError<T>) -> Self {ApplyError::MakeChange(err)}}