Show More
@@ -1,4 +1,5 b'' | |||||
1 | extern crate log; |
|
1 | extern crate log; | |
|
2 | use crate::error::CommandError; | |||
2 | use crate::ui::Ui; |
|
3 | use crate::ui::Ui; | |
3 | use clap::App; |
|
4 | use clap::App; | |
4 | use clap::AppSettings; |
|
5 | use clap::AppSettings; | |
@@ -20,7 +21,6 b' mod ui;' | |||||
20 | pub mod utils { |
|
21 | pub mod utils { | |
21 | pub mod path_utils; |
|
22 | pub mod path_utils; | |
22 | } |
|
23 | } | |
23 | use error::CommandError; |
|
|||
24 |
|
24 | |||
25 | fn main_with_result( |
|
25 | fn main_with_result( | |
26 | process_start_time: &blackbox::ProcessStartTime, |
|
26 | process_start_time: &blackbox::ProcessStartTime, | |
@@ -28,7 +28,7 b' fn main_with_result(' | |||||
28 | repo: Result<&Repo, &NoRepoInCwdError>, |
|
28 | repo: Result<&Repo, &NoRepoInCwdError>, | |
29 | config: &Config, |
|
29 | config: &Config, | |
30 | ) -> Result<(), CommandError> { |
|
30 | ) -> Result<(), CommandError> { | |
31 |
check_ |
|
31 | check_unsupported(config)?; | |
32 |
|
32 | |||
33 | let app = App::new("rhg") |
|
33 | let app = App::new("rhg") | |
34 | .global_setting(AppSettings::AllowInvalidUtf8) |
|
34 | .global_setting(AppSettings::AllowInvalidUtf8) | |
@@ -616,3 +616,15 b' fn check_extensions(config: &Config) -> ' | |||||
616 | }) |
|
616 | }) | |
617 | } |
|
617 | } | |
618 | } |
|
618 | } | |
|
619 | ||||
|
620 | fn check_unsupported(config: &Config) -> Result<(), CommandError> { | |||
|
621 | check_extensions(config)?; | |||
|
622 | ||||
|
623 | if std::env::var_os("HG_PENDING").is_some() { | |||
|
624 | // TODO: only if the value is `== repo.working_directory`? | |||
|
625 | // What about relative v.s. absolute paths? | |||
|
626 | Err(CommandError::unsupported("$HG_PENDING"))? | |||
|
627 | } | |||
|
628 | ||||
|
629 | Ok(()) | |||
|
630 | } |
General Comments 0
You need to be logged in to leave comments.
Login now