rhg: read [paths] for `--repository` value
hg parses `-R` and `--repository` CLI arguments "early" in order to know which local repository to load config from. (Config can then affect whether or how to fall back.) The value of of those arguments can be not only a filesystem path, but also an alias configured in the `[paths]` section. This part was missing in rhg and this patch implements that. The current patch still lacks functionality to read config of current repository if we are not at root of repo. That will be fixed in upcoming patches. A new crate `home` is added to get path of home directory. Differential Revision: https://phab.mercurial-scm.org/D10296
Showing
- rust/Cargo.lock 1 addition, 0 deletionsrust/Cargo.lock
- rust/hg-core/src/config.rs 1 addition, 1 deletionrust/hg-core/src/config.rs
- rust/hg-core/src/repo.rs 1 addition, 1 deletionrust/hg-core/src/repo.rs
- rust/rhg/Cargo.toml 1 addition, 0 deletionsrust/rhg/Cargo.toml
- rust/rhg/src/main.rs 69 additions, 3 deletionsrust/rhg/src/main.rs
- tests/test-globalopts.t 0 additions, 3 deletionstests/test-globalopts.t
Loading
Please register or sign in to comment