Error cleanup in libpijul
[?]
May 27, 2021, 10:05 AM
5GYRDN47UOT5BSCUID7VLDPI47KILTKGIHKG3AXMDPCTSHKKDB5ACDependencies
- [2]
PJ7T2VFLDo not hang on locked repositories - [3]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [4]
BZSC7VMYaddress clippy lints - [5]
BUM5P4VGCorrect error for Merkle::from_base32 - [6]
YN63NUZOSanakirja 1.0
Change contents
- replacement in libpijul/src/pristine/merkle.rs at line 83
type Err = crate::Error;type Err = crate::ParseError; - replacement in libpijul/src/pristine/merkle.rs at line 88
Err(crate::Error::ParseError { s: s.to_string() })Err(crate::ParseError { s: s.to_string() }) - replacement in libpijul/src/pristine/hash.rs at line 134
type Err = crate::Error;type Err = crate::ParseError; - replacement in libpijul/src/pristine/hash.rs at line 139
Err(crate::Error::ParseError { s: s.to_string() })Err(crate::ParseError { s: s.to_string() }) - replacement in libpijul/src/lib.rs at line 40
pub enum Error {#[error("File {:?} already in repository", path)]FileAlreadyInRepo { path: String },#[error("File {:?} not in repository", path)]FileNotInRepo { path: String },#[error("Cannot record from unrecorded prefix {:?}", path)]UnrecordedPath { path: String },#[error("File {:?} not found", path)]FileNotFound { path: String },#[error("Change not on channel {:?}", change_id)]ChangeNotOnChannel { change_id: pristine::ChangeId },#[error("Change is depended upon {:?}", change_id)]ChangeIsDependedUpon { change_id: pristine::ChangeId },#[error("Change not found: {:?}", hash)]ChangeNotFound { hash: String },#[error("State not found: {:?}", state)]StateNotFound { state: pristine::Merkle },#[error("Change hash mismatch: {:?} != {:?}", claimed, computed)]ChangeHashMismatch {claimed: pristine::Hash,computed: pristine::Hash,},#[error("Contents hash mismatch: {:?} != {:?}", claimed, computed)]ContentsHashMismatch {claimed: pristine::Hash,computed: pristine::Hash,},#[error("Change already on channel: {:?}", hash)]ChangeAlreadyOnChannel { hash: pristine::Hash },#[error("Dependency missing: {:?}", hash)]DependencyMissing { hash: pristine::Hash },#[error("Channel name already taken: {:?}", name)]ChannelNameExists { name: String },#[error("Parse error: {:?}", s)]ParseError { s: String },#[error("Verify error, public key = {:?}", pk)]VerifyError { pk: String },#[error("Ambiguous hash prefix: {}", prefix)]AmbiguousHashPrefix { prefix: String },#[error("Inconsistent references in change")]InconsistentChange,#[error("Missing change contents: {}", hash)]MissingContents { hash: String },#[error("Wrong block: {:?}", block)]WrongBlock {block: pristine::Position<pristine::ChangeId>,},#[error("Pristine corrupt")]PristineCorrupt,#[error("Change version mismatch, please run `pijul upgrade`.")]VersionMismatch,#[error("The repository is locked by another process.")]PristineLocked,#[error("Parse error: {:?}", s)]pub struct ParseError { s: String }#[derive(Debug, Error, Serialize, Deserialize)]pub enum RemoteError {#[error("Repository not found: {}", url)]RepositoryNotFound { url: String },#[error("Channel {} not found for repository {}", channel, url)]ChannelNotFound { channel: String, url: String },#[error("Ambiguous path: {}", path)]AmbiguousPath { path: String },#[error("Path not found: {}", path)]PathNotFound { path: String },#[error("Change not found: {}", change)]ChangeNotFound { change: String },