Mercurial > hg-stable
diff rust/hg-core/src/repo.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 | 95b276283b67 |
children | f031fe1c6ede |
line wrap: on
line diff
--- a/rust/hg-core/src/repo.rs Thu Feb 04 13:16:21 2021 +0100 +++ b/rust/hg-core/src/repo.rs Thu Feb 04 13:17:55 2021 +0100 @@ -1,3 +1,4 @@ +use crate::config::Config; use crate::errors::{HgError, IoResultExt}; use crate::requirements; use crate::utils::files::get_path_from_bytes; @@ -31,7 +32,7 @@ impl Repo { /// Search the current directory and its ancestores for a repository: /// a working directory that contains a `.hg` sub-directory. - pub fn find() -> Result<Self, RepoFindError> { + pub fn find(_config: &Config) -> Result<Self, RepoFindError> { let current_directory = crate::utils::current_dir()?; // ancestors() is inclusive: it first yields `current_directory` as-is. for ancestor in current_directory.ancestors() {