sapling/eden
Muir Manders 0a2bb133f6 eden: share treestate between Python and Rust
Summary:
Make the eden dirstate map use a treestate object under the hood instead of a plain Python dictionary. This way Python and Rust can stay in-sync wrt the dirstate.

I'm working on making everything use the Rust status internally (e.g. "hg commit" uses the Rust status). For this to work, pending dirstate changes from Python need to be visible to the Rust status. Non-EdenFS handles this by sharing the same treestate object between Rust and Python. This doesn't work for EdenFS since EdenFS uses its own dirstate format completely separate from the Rust workingcopy.

However, the Rust workingcopy already converts the EdenFS dirstate into an in-memory treestate object for compatibility. In this commit, I pass this treestate object along from Rust to the eden_dirstate_map to act as the underling _map. This way, mutations from Python will be available to the Rust status code.

This isn't as nice as completely migrating to treestate, but it is much easier and is a step in the right direction.

Reviewed By: quark-zju

Differential Revision: D46840436

fbshipit-source-id: 99904622507645001cc5a9f2096da9d83cda98d4
2023-06-22 21:57:53 -07:00
..
fs Remove Scuba and ODS URLs from eden rage 2023-06-22 13:56:24 -07:00
integration Add missing inodes in windows doctor 2023-06-09 11:52:50 -07:00
locale
mononoke add --no-merge flag 2023-06-22 10:31:22 -07:00
scm eden: share treestate between Python and Rust 2023-06-22 21:57:53 -07:00
test_support asyncio loop vars for 3.10 2023-05-01 10:56:58 -07:00
test-data test-data: remove snapshot 20190313 2022-02-04 13:50:48 -08:00
testlib Migrate "eden/testlib" from LLVM-12 to LLVM-15 2023-06-17 22:06:53 -07:00
.clang-tidy clang-tidy: disable facebook-hte-ContextDependentStaticInit 2022-11-04 15:33:50 -07:00
.gitignore
.mononoke_test_file test push 2022-01-06 05:57:35 -08:00
Eden.project.toml