Mercurial > public > mercurial-scm > hg
comparison rust/rhg/src/error.rs @ 52300:04b9a56c2d25
rust-lib: only export very common types to the top of the crate
This was done very early in the Rust project's lifecycle and I had very little
Rust experience. Let's keep the `DirstateParents` since they'll pop up in
all higher-level code and make the rest more explicit imports to make the
imports less confusing and the lib less cluttered.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 04 Nov 2024 11:13:05 +0100 |
parents | db065b33fa56 |
children | 79e8118cd846 |
comparison
equal
deleted
inserted
replaced
52299:b422acba55f1 | 52300:04b9a56c2d25 |
---|---|
2 use crate::ui::UiError; | 2 use crate::ui::UiError; |
3 use crate::NoRepoInCwdError; | 3 use crate::NoRepoInCwdError; |
4 use format_bytes::format_bytes; | 4 use format_bytes::format_bytes; |
5 use hg::config::{ConfigError, ConfigParseError, ConfigValueParseError}; | 5 use hg::config::{ConfigError, ConfigParseError, ConfigValueParseError}; |
6 use hg::dirstate::on_disk::DirstateV2ParseError; | 6 use hg::dirstate::on_disk::DirstateV2ParseError; |
7 use hg::dirstate::status::StatusError; | |
7 use hg::errors::HgError; | 8 use hg::errors::HgError; |
8 use hg::exit_codes; | 9 use hg::exit_codes; |
9 use hg::repo::RepoError; | 10 use hg::repo::RepoError; |
10 use hg::revlog::RevlogError; | 11 use hg::revlog::RevlogError; |
11 use hg::sparse::SparseConfigError; | 12 use hg::sparse::SparseConfigError; |
12 use hg::utils::files::get_bytes_from_path; | 13 use hg::utils::files::get_bytes_from_path; |
13 use hg::utils::hg_path::HgPathError; | 14 use hg::utils::hg_path::HgPathError; |
14 use hg::{DirstateError, DirstateMapError, PatternError, StatusError}; | 15 use hg::{DirstateError, DirstateMapError, PatternError}; |
15 use std::convert::From; | 16 use std::convert::From; |
16 | 17 |
17 /// The kind of command error | 18 /// The kind of command error |
18 #[derive(Debug)] | 19 #[derive(Debug)] |
19 pub enum CommandError { | 20 pub enum CommandError { |