sapling/eden/fs/config
Xavier Deguillard 8853701e91 path: forbid building non-utf8 paths
Summary:
The world has moved on utf-8 as the default encoding for files and data, but
EdenFS still accepts non utf-8 filenames to be written to it. In fact, most of
the time when a non utf-8 file is written to the working copy, and even though
EdenFS handles it properly, Mercurial ends up freaking out and crash. In all of
these cases, non-utf8 files were not intentional, and thus refusing to create
them wouldn't be a loss of functionality.

Note that this diff makes the asumption that Mercurial's manifest only accept
utf8 path, and thus we only have to protect against files being created in the
working copy that aren't utf8.

The unfortunate part of this diff is that it makes importing trees a bit more
expensive as testing that a path is utf8 valid is not free.

Reviewed By: chadaustin

Differential Revision: D25442975

fbshipit-source-id: 89341a004272736a61639751da43c2e9c673d5b3
2021-02-23 11:35:12 -08:00
..
test Rename Try::throwIfFailed -> throwUnlessValue 2021-01-11 13:05:17 -08:00
CachedParsedFileMonitor.h utils: move win/utils/Stub.h to utils/NotImplemented.h 2020-09-16 12:31:46 -07:00
CheckoutConfig.cpp path: forbid building non-utf8 paths 2021-02-23 11:35:12 -08:00
CheckoutConfig.h path: forbid building non-utf8 paths 2021-02-23 11:35:12 -08:00
CMakeLists.txt allow multiple prefixes for paths to be logged 2020-09-02 22:54:23 -07:00
ConfigSetting.h refactor EdenConfig to use private inheritance 2019-10-11 11:01:49 -07:00
eden_config.thrift enable py3 thrift language 2020-06-10 19:29:17 -07:00
EdenConfig.cpp path: verify that composed paths are comprised of valid PathComponent 2020-10-22 16:24:17 -07:00
EdenConfig.h fs: use an nfs request timeout confir 2021-02-22 22:40:39 -08:00
FieldConverter.cpp check multiple locations for x509 certs 2020-09-23 19:58:52 -07:00
FieldConverter.h teach eden to parse arrays in configs 2020-09-14 17:40:13 -07:00
FileChangeMonitor.cpp utils: move win/utils/Stub.h to utils/NotImplemented.h 2020-09-16 12:31:46 -07:00
FileChangeMonitor.h utils: move win/utils/Stub.h to utils/NotImplemented.h 2020-09-16 12:31:46 -07:00
ReloadableConfig.cpp log the path that caused configs to be reloaded 2020-09-11 16:53:49 -07:00
ReloadableConfig.h optimize and simplify ReloadableConfig 2019-10-11 10:42:36 -07:00
TomlConfig.h remove dependency on glog 2020-11-10 16:31:15 -08:00