Mercurial > public > mercurial-scm > hg-stable
diff rust/rhg/src/commands/debugrequirements.rs @ 46543:a6e4e4650bac
rhg: Parse system and user configuration at program start
? and pass it around up to `Repo::find`
Differential Revision: https://phab.mercurial-scm.org/D9962
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Thu, 04 Feb 2021 13:17:55 +0100 |
parents | d03b0601e0eb |
children | 184e46550dc8 |
line wrap: on
line diff
--- a/rust/rhg/src/commands/debugrequirements.rs Thu Feb 04 13:16:21 2021 +0100 +++ b/rust/rhg/src/commands/debugrequirements.rs Thu Feb 04 13:17:55 2021 +0100 @@ -1,6 +1,7 @@ use crate::commands::Command; use crate::error::CommandError; use crate::ui::Ui; +use hg::config::Config; use hg::repo::Repo; pub const HELP_TEXT: &str = " @@ -16,8 +17,8 @@ } impl Command for DebugRequirementsCommand { - fn run(&self, ui: &Ui) -> Result<(), CommandError> { - let repo = Repo::find()?; + fn run(&self, ui: &Ui, config: &Config) -> Result<(), CommandError> { + let repo = Repo::find(config)?; let mut output = String::new(); let mut requirements: Vec<_> = repo.requirements().iter().collect(); requirements.sort();