Mercurial > public > mercurial-scm > hg
diff rust/rhg/src/commands/debugrequirements.rs @ 46503:d8730ff51d5a
rhg: Add support for -R and --repository command-line arguments
Differential Revision: https://phab.mercurial-scm.org/D9970
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 08 Feb 2021 21:37:30 +0100 |
parents | 1ecaf09d9964 |
children | 80840b651721 |
line wrap: on
line diff
--- a/rust/rhg/src/commands/debugrequirements.rs Mon Feb 08 21:28:52 2021 +0100 +++ b/rust/rhg/src/commands/debugrequirements.rs Mon Feb 08 21:37:30 2021 +0100 @@ -3,6 +3,7 @@ use clap::ArgMatches; use hg::config::Config; use hg::repo::Repo; +use std::path::Path; pub const HELP_TEXT: &str = " Print the current repo requirements. @@ -15,9 +16,10 @@ pub fn run( ui: &Ui, config: &Config, + repo_path: Option<&Path>, _args: &ArgMatches, ) -> Result<(), CommandError> { - let repo = Repo::find(config)?; + let repo = Repo::find(config, repo_path)?; let mut output = String::new(); let mut requirements: Vec<_> = repo.requirements().iter().collect(); requirements.sort();