Show More
@@ -569,7 +569,10 b' name = "rhg"' | |||||
569 | version = "0.1.0" |
|
569 | version = "0.1.0" | |
570 | dependencies = [ |
|
570 | dependencies = [ | |
571 | "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|
571 | "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
|
572 | "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", | |||
572 | "hg-core 0.1.0", |
|
573 | "hg-core 0.1.0", | |
|
574 | "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
575 | "micro-timer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", | |||
573 | ] |
|
576 | ] | |
574 |
|
577 | |||
575 | [[package]] |
|
578 | [[package]] |
@@ -7,4 +7,6 b' edition = "2018"' | |||||
7 | [dependencies] |
|
7 | [dependencies] | |
8 | hg-core = { path = "../hg-core"} |
|
8 | hg-core = { path = "../hg-core"} | |
9 | clap = "2.33.1" |
|
9 | clap = "2.33.1" | |
10 |
|
10 | log = "0.4.11" | ||
|
11 | micro-timer = "0.3.1" | |||
|
12 | env_logger = "0.7.1" |
@@ -5,6 +5,7 b' use crate::ui::Ui;' | |||||
5 | use hg::operations::{ |
|
5 | use hg::operations::{ | |
6 | DebugData, DebugDataError, DebugDataErrorKind, DebugDataKind, |
|
6 | DebugData, DebugDataError, DebugDataErrorKind, DebugDataKind, | |
7 | }; |
|
7 | }; | |
|
8 | use micro_timer::timed; | |||
8 |
|
9 | |||
9 | pub const HELP_TEXT: &str = " |
|
10 | pub const HELP_TEXT: &str = " | |
10 | Dump the contents of a data file revision |
|
11 | Dump the contents of a data file revision | |
@@ -22,6 +23,7 b" impl<'a> DebugDataCommand<'a> {" | |||||
22 | } |
|
23 | } | |
23 |
|
24 | |||
24 | impl<'a> Command for DebugDataCommand<'a> { |
|
25 | impl<'a> Command for DebugDataCommand<'a> { | |
|
26 | #[timed] | |||
25 | fn run(&self, ui: &Ui) -> Result<(), CommandError> { |
|
27 | fn run(&self, ui: &Ui) -> Result<(), CommandError> { | |
26 | let mut operation = DebugData::new(self.rev, self.kind); |
|
28 | let mut operation = DebugData::new(self.rev, self.kind); | |
27 | let data = |
|
29 | let data = |
@@ -1,3 +1,4 b'' | |||||
|
1 | extern crate log; | |||
1 | use clap::App; |
|
2 | use clap::App; | |
2 | use clap::AppSettings; |
|
3 | use clap::AppSettings; | |
3 | use clap::Arg; |
|
4 | use clap::Arg; | |
@@ -15,6 +16,7 b' use commands::Command;' | |||||
15 | use error::CommandError; |
|
16 | use error::CommandError; | |
16 |
|
17 | |||
17 | fn main() { |
|
18 | fn main() { | |
|
19 | env_logger::init(); | |||
18 | let app = App::new("rhg") |
|
20 | let app = App::new("rhg") | |
19 | .setting(AppSettings::AllowInvalidUtf8) |
|
21 | .setting(AppSettings::AllowInvalidUtf8) | |
20 | .setting(AppSettings::SubcommandRequired) |
|
22 | .setting(AppSettings::SubcommandRequired) |
General Comments 0
You need to be logged in to leave comments.
Login now