Mercurial > hg
comparison rust/hg-core/src/config.rs @ 46187:95d6f31e88db
hg-core: add basic config module
The config module exposes a `Config` struct, unused for now.
It only reads the config file local to the repository, but handles all valid
patterns and includes/unsets.
It is structured in layers instead of erasing by reverse order of precedence,
allowing us to transparently know more about the config for debugging purposes,
and potentially other things I haven't thought about yet.
This change also introduces `format_bytes!` to `hg-core`.
Differential Revision: https://phab.mercurial-scm.org/D9408
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Tue, 29 Dec 2020 10:53:45 +0100 |
parents | |
children | 2845892dd489 |
comparison
equal
deleted
inserted
replaced
46186:5f27924a201d | 46187:95d6f31e88db |
---|---|
1 // config.rs | |
2 // | |
3 // Copyright 2020 | |
4 // Valentin Gatien-Baron, | |
5 // Raphaël Gomès <rgomes@octobus.net> | |
6 // | |
7 // This software may be used and distributed according to the terms of the | |
8 // GNU General Public License version 2 or any later version. | |
9 | |
10 //! Mercurial config parsing and interfaces. | |
11 | |
12 mod config; | |
13 mod layer; | |
14 pub use config::Config; |