Mercurial > public > mercurial-scm > hg
comparison rust/hg-core/src/update.rs @ 52178:bd8081e9fd62
rust: don't star export from the `revlog` module
This made a lot of the imports confusing because they didn't make sense
at the top level (so, outside of `revlog`), and they hide the more common
types when autocompleting.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Thu, 26 Sep 2024 14:26:24 +0200 |
parents | 039b7caeb4d9 |
children | 65d516db7309 |
comparison
equal
deleted
inserted
replaced
52177:3d797007905d | 52178:bd8081e9fd62 |
---|---|
12 dirstate::{ParentFileData, TruncatedTimestamp}, | 12 dirstate::{ParentFileData, TruncatedTimestamp}, |
13 dirstate_tree::{ | 13 dirstate_tree::{ |
14 dirstate_map::DirstateEntryReset, on_disk::write_tracked_key, | 14 dirstate_map::DirstateEntryReset, on_disk::write_tracked_key, |
15 }, | 15 }, |
16 errors::{HgError, IoResultExt}, | 16 errors::{HgError, IoResultExt}, |
17 exit_codes, | 17 exit_codes, narrow, |
18 filelog::Filelog, | |
19 narrow, | |
20 node::NULL_NODE, | |
21 operations::{list_rev_tracked_files, ExpandedManifestEntry}, | 18 operations::{list_rev_tracked_files, ExpandedManifestEntry}, |
22 options::{default_revlog_options, RevlogOpenOptions}, | |
23 progress::Progress, | 19 progress::Progress, |
24 repo::Repo, | 20 repo::Repo, |
21 revlog::filelog::Filelog, | |
22 revlog::node::NULL_NODE, | |
23 revlog::options::{default_revlog_options, RevlogOpenOptions}, | |
24 revlog::RevlogError, | |
25 sparse, | 25 sparse, |
26 utils::{ | 26 utils::{ |
27 files::{filesystem_now, get_path_from_bytes}, | 27 files::{filesystem_now, get_path_from_bytes}, |
28 hg_path::{hg_path_to_path_buf, HgPath, HgPathError}, | 28 hg_path::{hg_path_to_path_buf, HgPath, HgPathError}, |
29 path_auditor::PathAuditor, | 29 path_auditor::PathAuditor, |
30 }, | 30 }, |
31 vfs::{is_on_nfs_mount, VfsImpl}, | 31 vfs::{is_on_nfs_mount, VfsImpl}, |
32 DirstateParents, RevlogError, UncheckedRevision, | 32 DirstateParents, UncheckedRevision, |
33 }; | 33 }; |
34 use crossbeam_channel::{Receiver, Sender}; | 34 use crossbeam_channel::{Receiver, Sender}; |
35 use rayon::prelude::*; | 35 use rayon::prelude::*; |
36 | 36 |
37 fn write_dirstate(repo: &Repo) -> Result<(), HgError> { | 37 fn write_dirstate(repo: &Repo) -> Result<(), HgError> { |
91 } | 91 } |
92 let store_vfs = &repo.store_vfs(); | 92 let store_vfs = &repo.store_vfs(); |
93 let options = default_revlog_options( | 93 let options = default_revlog_options( |
94 repo.config(), | 94 repo.config(), |
95 repo.requirements(), | 95 repo.requirements(), |
96 crate::RevlogType::Filelog, | 96 crate::revlog::RevlogType::Filelog, |
97 )?; | 97 )?; |
98 let (errors_sender, errors_receiver) = crossbeam_channel::unbounded(); | 98 let (errors_sender, errors_receiver) = crossbeam_channel::unbounded(); |
99 let (files_sender, files_receiver) = crossbeam_channel::unbounded(); | 99 let (files_sender, files_receiver) = crossbeam_channel::unbounded(); |
100 let working_directory_path = &repo.working_directory_path(); | 100 let working_directory_path = &repo.working_directory_path(); |
101 | 101 |
132 Ok(total) | 132 Ok(total) |
133 } | 133 } |
134 | 134 |
135 fn handle_revlog_error(e: RevlogError) -> HgError { | 135 fn handle_revlog_error(e: RevlogError) -> HgError { |
136 match e { | 136 match e { |
137 crate::RevlogError::Other(hg_error) => hg_error, | 137 crate::revlog::RevlogError::Other(hg_error) => hg_error, |
138 e => HgError::abort( | 138 e => HgError::abort( |
139 format!("revlog error: {}", e), | 139 format!("revlog error: {}", e), |
140 exit_codes::ABORT, | 140 exit_codes::ABORT, |
141 None, | 141 None, |
142 ), | 142 ), |