A Scalable, User-Friendly Source Control System.
Go to file
Xavier Deguillard aaecd3369f inodes: always lay placeholders on directories
Summary:
EdenFS assumes in several places that even materialized directories will
receive readdir requests. This assumption is slightly wrong on Windows in the
case where a directory hierarchy is completely removed, and then reconstructed
at the identical, with say a filesystem revert operation. In that case, EdenFS
will not participate in any readdir requests in this directory hierarchy as no
directories are placeholder.

During checkout, this assumption is used to dematerialize directories in
saveOverlayPostCheckout, in some cases however, this can lead to dematerialized
directories being contained in a non-placeholder directory on Windows.  This
case in particular is fraught with issues. For instance,
invalidateChildrenNotMaterialized may invalidate these dematerialized
directories but doing so would make these disappear entirely due to EdenFS not
participating in non-placeholder directories! I believe a similar issue may
also be possible with future checkout operations, although the exact steps
elude me.

To solve the above, one easy way is to simply force directories traversed by
checkout to always have a placeholder added to them. This is achieved by
invalidating the directory. Since it's unclear if we could also always
invalidate the directory on Linux and macOS, let's add a config so we can roll
this out slowly.

Reviewed By: kmancini

Differential Revision: D42483525

fbshipit-source-id: 9d8c9fe3db8914ca2a46a77f10cf77f2ff871ad9
2023-01-19 12:21:06 -08:00
.github/workflows bump Python in Github macOS actions to 3.11 (#319) 2022-12-12 12:52:55 -08:00
addons build(deps): bump json5 from 1.0.1 to 1.0.2 in /addons (#380) 2023-01-19 11:01:47 -08:00
build Updating submodules 2023-01-19 12:17:55 -08:00
ci (build): Support sapling in tag-name.sh (#439) 2023-01-19 11:55:00 -08:00
CMake cmake-rust: merge two RustStaticLibrary.cmake and add feature support 2022-09-13 16:18:27 -07:00
common Use cached values 2022-08-10 11:06:01 -07:00
configerator/structs/scm (2/2) Rename write mostly to write only 2023-01-13 09:23:35 -08:00
eden inodes: always lay placeholders on directories 2023-01-19 12:21:06 -08:00
website build(deps): bump json5 from 1.0.1 to 1.0.2 in /website (#381) 2023-01-19 10:21:42 -08:00
.gitignore mononoke: add README.md and the missing pieces for supporting cargo (#13) 2020-02-13 00:12:36 -08:00
.projectid replace the old getdeps.py script with a build.sh script 2020-03-30 19:27:54 -07:00
build.bat fs: fix license header 2022-01-04 15:00:07 -08:00
build.sh fs: fix license header 2022-01-04 15:00:07 -08:00
CMakeLists.txt fs: fix license header 2022-01-04 15:00:07 -08:00
CODE_OF_CONDUCT.md Adopt Contributor Covenant 2019-08-29 23:23:31 -07:00
CONTRIBUTING.md fix CONTRIBUTING.md to reference main instead of master (#436) 2023-01-18 19:58:13 -08:00
LICENSE relicense to GPLv2 2019-06-19 17:02:45 -07:00
make-client.py fs: fix license header 2022-01-04 15:00:07 -08:00
README.md website: downplay Mononoke and EdenFS in readme.md 2022-11-15 09:02:28 -08:00
requirements_ubuntu.txt include oss installation instructions for ubuntu 2020-07-24 11:34:17 -07:00
rustfmt.toml rustfmt.toml: group_imports = StdExternalCrate 2022-08-06 12:33:42 -07:00
SAPLING_VERSION bump SAPLING_VERSION from 0.1 to 0.2 in preparation for the next release 2022-12-21 12:23:53 -08:00

Sapling SCM

Sapling SCM is a cross-platform, highly scalable, Git-compatible source control system.

It aims to provide both user-friendly and powerful interfaces for users, as well as extreme scalability to deal with repositories containing many millions of files and many millions of commits.

Using Sapling

To start using Sapling, see the Getting Started page for how to clone your existing Git repositories. Checkout the Overview for a peek at the various features. Coming from Git? Checkout the Git Cheat Sheet.

Sapling also comes with an Interactive Smartlog (ISL) web UI for seeing and interacting with your repository, as well as a VS Code integrated Interactive Smartlog.

The Sapling Ecosystem

Sapling SCM is comprised of three main components:

  • The Sapling client: The client-side sl command line and web interface for users to interact with Sapling SCM.
  • Mononoke: A highly scalable distributed source control server. (Not yet supported publicly.)
  • EdenFS: A virtual filesystem for efficiently checking out large repositories. (Not yet supported publicly.)

Sapling SCM's scalability goals are to ensure that all source control operations scale with the number of files in use by a developer, and not with the size of the repository itself. This enables fast, performant developer experiences even in massive repositories with millions of files and extremely long commit histories.

Sapling CLI

The Sapling CLI, sl, was originally based on Mercurial, and shares various aspects of the UI and features of Mercurial.

The CLI code can be found in the eden/scm subdirectory.

Mononoke

Mononoke is the server-side component of Sapling SCM.

While it is used in production within Meta, it currently does not build in an open source context and is not yet supported for external usage.

EdenFS

EdenFS is a virtual file system for managing Sapling checkouts.

While it is used in production within Meta, it currently does not build in an open source context and is not yet supported for external usage.

EdenFS speeds up operations in large repositories by only populating working directory files on demand, as they are accessed. This makes operations like checkout much faster, in exchange for a small performance hit when first accessing new files. This is quite beneficial in large repositories where developers often only work with a small subset of the repository at a time.

More detailed EdenFS design documentation can be found at eden/fs/docs/Overview.md.

Building the Sapling CLI

The Sapling CLI currently builds and runs on Linux, Mac, and Windows. It can be built by running make oss in the eden/scm directory and running the resulting sl executable.

Building the Sapling CLI requires Python 3.8, Rust, cmake, and OpenSSL for the main cli, and Node and Yarn for the ISL web UI.

License

See LICENSE.