Mercurial > public > mercurial-scm > hg-stable
annotate rust/hg-core/src/config.rs @ 49703:dbe09fb038fc stable
rhg: remember the inode of .hg/dirstate
This allows us to detect changes of `.hg/dirstate`, which is either the
full dirstate (in dirstate-v1) or the docket file (v2) without relying on
data inside the file. It only works on UNIX systems.
This fixes a race condition for dirstate-v1 (as demonstrated by
the test changes) and adds a confortable layer of sanity for dirstate-v2.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Wed, 01 Mar 2023 16:48:09 +0100 |
parents | 467d9df98c68 |
children |
rev | line source |
---|---|
46187
95d6f31e88db
hg-core: add basic config module
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
1 // config.rs |
95d6f31e88db
hg-core: add basic config module
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
2 // |
95d6f31e88db
hg-core: add basic config module
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
3 // Copyright 2020 |
95d6f31e88db
hg-core: add basic config module
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
4 // Valentin Gatien-Baron, |
95d6f31e88db
hg-core: add basic config module
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
5 // Raphaël Gomès <rgomes@octobus.net> |
95d6f31e88db
hg-core: add basic config module
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
6 // |
95d6f31e88db
hg-core: add basic config module
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
7 // This software may be used and distributed according to the terms of the |
95d6f31e88db
hg-core: add basic config module
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
8 // GNU General Public License version 2 or any later version. |
95d6f31e88db
hg-core: add basic config module
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
9 |
95d6f31e88db
hg-core: add basic config module
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
10 //! Mercurial config parsing and interfaces. |
95d6f31e88db
hg-core: add basic config module
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
11 |
95d6f31e88db
hg-core: add basic config module
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
12 mod config; |
95d6f31e88db
hg-core: add basic config module
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
13 mod layer; |
49518
467d9df98c68
rhg: centralize PlainInfo
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
49517
diff
changeset
|
14 mod plain_info; |
46641
a687a7f27951
rust: Move config value parsing functions to a new module
Simon Sapin <simon.sapin@octobus.net>
parents:
46637
diff
changeset
|
15 mod values; |
49518
467d9df98c68
rhg: centralize PlainInfo
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
49517
diff
changeset
|
16 pub use config::{Config, ConfigSource, ConfigValueParseError}; |
48743
39c447e03dbc
rhg: Add support for colored output
Simon Sapin <simon.sapin@octobus.net>
parents:
47410
diff
changeset
|
17 pub use layer::{ConfigError, ConfigOrigin, ConfigParseError}; |
49518
467d9df98c68
rhg: centralize PlainInfo
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
49517
diff
changeset
|
18 pub use plain_info::PlainInfo; |