A Scalable, User-Friendly Source Control System.
Go to file
Michael Bolin 83b3c38095 Fix for hg split in Eden.
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
2017-09-06 21:20:45 -07:00
common Change API between SwSwitch and HwSwitch to indicate HwSwitch might fail some 2017-06-02 13:38:22 -07:00
eden Fix for hg split in Eden. 2017-09-06 21:20:45 -07:00
external get the open source build working 2017-03-06 20:28:48 -08:00
.buckconfig move eden/fs/cli to eden/cli 2017-04-14 11:39:01 -07:00
.gitignore Initial commit 2016-05-12 14:09:13 -07:00
CONTRIBUTING.md Initial commit 2016-05-12 14:09:13 -07:00
DEFS get the open source build working 2017-03-06 20:28:48 -08:00
getdeps.py replace the getdeps.sh script with a python version 2017-03-08 16:38:36 -08:00
install Make oss install script less hacky using --out argument to buck build. 2017-02-28 12:12:35 -08:00
LICENSE Initial commit 2016-05-12 14:09:13 -07:00
PATENTS Initial commit 2016-05-12 14:09:13 -07:00
README.md Fix a typo in Eden's README.md. 2016-05-13 09:32:03 -07:00

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.