equal
deleted
inserted
replaced
1 use crate::error::CommandError; |
1 use crate::error::CommandError; |
2 use clap::Arg; |
2 use clap::Arg; |
3 use clap::ArgGroup; |
3 use clap::ArgGroup; |
4 use hg::operations::{debug_data, DebugDataKind}; |
4 use hg::operations::{debug_data, DebugDataKind}; |
5 use micro_timer::timed; |
|
6 |
5 |
7 pub const HELP_TEXT: &str = " |
6 pub const HELP_TEXT: &str = " |
8 Dump the contents of a data file revision |
7 Dump the contents of a data file revision |
9 "; |
8 "; |
10 |
9 |
34 .value_name("REV"), |
33 .value_name("REV"), |
35 ) |
34 ) |
36 .about(HELP_TEXT) |
35 .about(HELP_TEXT) |
37 } |
36 } |
38 |
37 |
39 #[timed] |
38 #[logging_timer::time("trace")] |
40 pub fn run(invocation: &crate::CliInvocation) -> Result<(), CommandError> { |
39 pub fn run(invocation: &crate::CliInvocation) -> Result<(), CommandError> { |
41 let args = invocation.subcommand_args; |
40 let args = invocation.subcommand_args; |
42 let rev = args |
41 let rev = args |
43 .get_one::<String>("rev") |
42 .get_one::<String>("rev") |
44 .expect("rev should be a required argument"); |
43 .expect("rev should be a required argument"); |