rust/hg-core/src/config.rs
author Pulkit Goyal <7895pulkit@gmail.com>
Sun, 11 Apr 2021 00:50:10 +0530
changeset 47404 ebdef6283798
parent 46602 a687a7f27951
child 48733 39c447e03dbc
permissions -rw-r--r--
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

// config.rs
//
// Copyright 2020
//      Valentin Gatien-Baron,
//      Raphaël Gomès <rgomes@octobus.net>
//
// This software may be used and distributed according to the terms of the
// GNU General Public License version 2 or any later version.

//! Mercurial config parsing and interfaces.

mod config;
mod layer;
mod values;
pub use config::{Config, ConfigSource, ConfigValueParseError};
pub use layer::{ConfigError, ConfigParseError};