sapling/eden/fs/model
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
..
git path: forbid building non-utf8 paths 2021-02-23 11:35:12 -08:00
test model: remove test-only constructor for TreeEntry 2021-01-05 14:08:14 -08:00
Blob.h Tidy up license headers 2019-10-11 05:28:23 -07:00
CMakeLists.txt model: add tests to CMake 2020-05-07 10:07:32 -07:00
Hash.cpp model: add toByteString to Hash 2020-10-05 15:51:18 -07:00
Hash.h model: add toByteString to Hash 2020-10-05 15:51:18 -07:00
ParentCommits.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
ParentCommits.h Tidy up license headers 2019-10-11 05:28:23 -07:00
Tree.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
Tree.h Tidy up license headers 2019-10-11 05:28:23 -07:00
TreeEntry.cpp Remove dead includes in eden 2020-10-09 15:25:47 -07:00
TreeEntry.h model: remove test-only constructor for TreeEntry 2021-01-05 14:08:14 -08:00