diff -r 95d37db31479 -r d8730ff51d5a rust/rhg/src/commands/root.rs --- a/rust/rhg/src/commands/root.rs Mon Feb 08 21:28:52 2021 +0100 +++ b/rust/rhg/src/commands/root.rs Mon Feb 08 21:37:30 2021 +0100 @@ -5,6 +5,7 @@ use hg::config::Config; use hg::repo::Repo; use hg::utils::files::get_bytes_from_path; +use std::path::Path; pub const HELP_TEXT: &str = " Print the root directory of the current repository. @@ -19,9 +20,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 bytes = get_bytes_from_path(repo.working_directory_path()); ui.write_stdout(&format_bytes!(b"{}\n", bytes.as_slice()))?; Ok(())