Mercurial > public > mercurial-scm > hg-stable
diff rust/rhg/src/commands/debugdata.rs @ 51905:69b804c8e09e
rust: use new revlog configs in all revlog opening code
This centralizes the more complex logic needed for the upcoming code
and creates stronger APIs with fewer booleans.
We also reuse `RevlogType` where needed.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Wed, 19 Jun 2024 12:49:26 +0200 |
parents | 532e74ad3ff6 |
children | bd8081e9fd62 |
line wrap: on
line diff
--- a/rust/rhg/src/commands/debugdata.rs Tue Sep 17 10:18:32 2024 +0200 +++ b/rust/rhg/src/commands/debugdata.rs Wed Jun 19 12:49:26 2024 +0200 @@ -1,7 +1,8 @@ use crate::error::CommandError; use clap::Arg; use clap::ArgGroup; -use hg::operations::{debug_data, DebugDataKind}; +use hg::operations::debug_data; +use hg::RevlogType; pub const HELP_TEXT: &str = " Dump the contents of a data file revision @@ -45,8 +46,8 @@ args.get_one::<bool>("changelog").unwrap(), args.get_one::<bool>("manifest").unwrap(), ) { - (true, false) => DebugDataKind::Changelog, - (false, true) => DebugDataKind::Manifest, + (true, false) => RevlogType::Changelog, + (false, true) => RevlogType::Manifestlog, (true, true) => { unreachable!("Should not happen since options are exclusive") }