sapling/eden/fs/model
Xavier Deguillard a75af7a63d PathFuncs: allow paths on Windows to be '\' separated
Summary:
Previously, when that code was ported on Windows, paths separator were
converted from '\' to '/' when a wide string was provided, all the other paths
were treated as is.

The main issue with this strategy is that not all paths can be converted, the
non-stored ones for instance are immutable, which leads to some subtle bugs
down the line. For instance, the paths: "Z:/foo/bar/baz" and "Z:\foo/bar\baz"
would not be equal as the path separator isn't the same, but both of these are
actually the same path underneath.

To solve this, this diff first introduce a Windows path separator, and then
modifies the path comparison functions to ignore the path separator and only
compare the components.

I'm definitively not a fan of the pattern I use for searching for both / and \
in paths, suggestions are welcome for how to improve that.

Reviewed By: chadaustin

Differential Revision: D24376980

fbshipit-source-id: 0702bf775c7c3937b2138abd5a63d339ac80aaed
2020-10-22 16:24:17 -07:00
..
git PathFuncs: allow paths on Windows to be '\' separated 2020-10-22 16:24:17 -07:00
test win: move win/utils onto utils/ 2020-09-22 09:09:56 -07: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: report symlink/executable as regular files on Windows 2020-05-12 08:46:35 -07:00