Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/config/layer.rs @ 46742:91ab5190a3de
rhg: Add support for environment variables in config include paths
Some tests rely on this.
Differential Revision: https://phab.mercurial-scm.org/D10140
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 08 Mar 2021 15:35:32 +0100 |
parents | 12d59eec7f1d |
children | 84a3deca963a |
line wrap: on
line diff
--- a/rust/hg-core/src/config/layer.rs Mon Mar 08 08:55:48 2021 +0100 +++ b/rust/hg-core/src/config/layer.rs Mon Mar 08 15:35:32 2021 +0100 @@ -150,6 +150,7 @@ let line = Some(index + 1); if let Some(m) = INCLUDE_RE.captures(&bytes) { let filename_bytes = &m[1]; + let filename_bytes = crate::utils::expand_vars(filename_bytes); // `Path::parent` only fails for the root directory, // which `src` can’t be since we’ve managed to open it as a // file.