rust/rhg/src/commands/debugdata.rs
changeset 49913 c15b415d1bff
parent 49639 37bc3edef76f
child 51120 532e74ad3ff6
equal deleted inserted replaced
49912:bc83ebe07bf0 49913:c15b415d1bff
     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");