mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
7a7f98f1b2
Summary: Since configparser enforces utf-8 config files (because pest wants Rust strings), let's migrate from Bytes to Text to remove extra encoding conversions. Previously this was blocked by the lack of ref-counted text (since the "source" of each config location is the entire config file). Now minibytes provides Text so we can use it. This unfortunately requires dependent code to be updated. The pyconfigparser interface is in theory wrong - it shouldn't return utf-8 bytes but local-encoded bytes. I think it's cleaner to make pyconfigparser unaware of HGENCODING, so I changed pyconfigparser to use unicode, and add compatibility layer in uiconfig.py. This also fixes non-ascii encoding issues on user name (especially on Windows). The hgrc config file should be in utf-8 and the config parser returns explicit unicode types, and Python code round-trip them with local encodings. Reviewed By: markbt Differential Revision: D20432938 fbshipit-source-id: b1359429b8f1c133ab2d6b2deea6048377dfeca1 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |