mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 15:57:43 +03:00
A Scalable, User-Friendly Source Control System.
83b3c38095
Summary: Before this change, `hg split` crashed complaining that `node` was a `changectxwrapper` instead of a 20-byte hash when it was sent as `parent1` of `WorkingDirectoryParents` in `resetParentCommits()`. Now we use `node()` to get the hash from the `destctx` that we have already extracted via this line earlier in `merge_update()`: destctx = repo[node] The change to `eden/hg/eden/__init__.py` eliminated the crash, but was not sufficient on its own to make `hg split` work correctly. There was also a fix required in `Dirstate.cpp` where the `onSnapshotChanged()` callback was clearing out entries of both `NotApplicable` and `BothParents` from `hgDirstateTuples`. It appears that only `NotApplicable` entries should be cleared. (I tried leaving `NotApplicable` entries in there, but that broke `eden/integration/hg/graft_test.py`.) I suspected that the logic to clear out `hgDestToSourceCopyMap` in `Dirstate::onSnapshotChanged` was also wrong, so I deleted it and all of the integration tests still pass. Admittedly, we are pretty weak in our test coverage for use cases that write to the `hgDestToSourceCopyMap`. In general, we should rely on Mercurial to explicitly remove entries from `hgDestToSourceCopyMap`. We have a Thrift API, `hgClearDirstate()`, that `eden_dirstate` can use to categorically clear out `hgDirstateTuples` and `hgDestToSourceCopyMap`, if necessary. Finally, creating a proper integration test for `hg split` required creating a value for `HGEDITOR` that could write different commit messages for different commits. To that end, I added a `create_editor_that_writes_commit_messages()` utility as a method of `HgExtensionTestBase` and updated its `hg()` method to take `hgeditor` as an optional parameter. Reviewed By: wez Differential Revision: D5758236 fbshipit-source-id: 5cb8bf4207d4e802726cd93108fae4a6d48f45ec |
||
---|---|---|
common | ||
eden | ||
external | ||
.buckconfig | ||
.gitignore | ||
CONTRIBUTING.md | ||
DEFS | ||
getdeps.py | ||
install | ||
LICENSE | ||
PATENTS | ||
README.md |
Eden
Eden is a project with several components, the most prominent of which is a virtual filesystem built using FUSE.
Caveat Emptor
Eden is still in early stages of development. We are making it available now because we plan to start making references to it from our other open source projects, such as Buck, Watchman, and Nuclide.
The version that we provide on GitHub does not build yet.
This is because the code is exported verbatim from an internal repository at Facebook, and not all of the scaffolding from our internal repository can be easily extracted. The key areas where we need to shore things up are:
- The reinterpretations of build macros in
DEFS
. - A process for including third-party dependencies (presumably via Git submodules) and wiring up the
external_deps
argument in the build macros to point to them. - Providing the toolchain needed to power the [undocumented]
thrift_library()
rule in Buck.
The goal is to get Eden building on both Linux and OS X, though Linux support is expected to come first.