Mercurial > hg
changeset 50982:10e57e3f7276
rust-config: show default `null` is coerced incorrectly to `false`
Probably being too trigger happy about boolean values, I incorrectly set
the transform for a `None` to a `Some(false)`. It would cause for example
the `ui.formatted` value to be set to `Some(false)`, which turns off the colors
among other things, when `None` would trigger the automatic behavior.
This is fixed in the next commit.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 09 Aug 2023 15:44:56 +0200 |
parents | 58390f59826f |
children | 8343947af6a7 |
files | rust/hg-core/src/config/mod.rs |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/hg-core/src/config/mod.rs Wed Aug 09 15:41:18 2023 +0200 +++ b/rust/hg-core/src/config/mod.rs Wed Aug 09 15:44:56 2023 +0200 @@ -803,5 +803,9 @@ .expect("expected valid config"); let ret = config.get_byte_size(b"cmdserver", b"max-log-size"); assert!(ret.is_ok(), "{:?}", ret); + + let ret = config.get_byte_size(b"ui", b"formatted"); + // FIXME should be `is_none()` + assert!(ret.unwrap().is_some()); } }