A Scalable, User-Friendly Source Control System.
Go to file
Jeremy Fitzhardinge dc5e78c1c1 rust: mass convert scm/mononoke/... to use failure
Summary:
Convert scm/mononoke to use failure, and update common/rust crates it depends on as well.

What it looks like is a lot of deleted code...

General strategy:
- common/rust/failure_ext adds some things that are in git failure that aren't yet in crates.io (`bail!` and `ensure!`, `Result<T, Error>`)
- everything returns `Result<T, failure::Error>`
- crates with real error get an error type, with a derived Fail implementation
  - replicate error-chain by defining an `enum ErrorKind` where the fields match the declared errors in the error! macro
- crates with dummy error-chain (no local errors) lose it
- `.chain_err()` -> `.context()` or `.with_context()`

So far the only place I've needed to extract an error is in a unit test.
Having a single unified error type has simplified a lot of things, and removed a lot of error type parameters, error conversion, etc, etc.

Reviewed By: sid0

Differential Revision: D6446584

fbshipit-source-id: 744640ca2997d4a85513c4519017f2e2e78a73f5
2017-12-05 18:11:13 -08:00
async-compression/src rust: async-compression: loosen decompressor lifetime bound 2017-11-01 18:51:21 -07:00
asyncmemo/src rust: asyncmemo: add failure test 2017-08-29 12:36:18 -07:00
blobrepo/src rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
blobstore rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
bookmarks rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
cmds rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
eden_server/src rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
futures-ext/src Update to Rust 1.21 2017-11-29 15:21:41 -08:00
heads rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
hgcli hgcli: add a bash script for using mononoke deployed inside tupperware 2017-10-18 05:37:00 -07:00
hgproto rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
hooks/src rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
linknodes rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
mercurial/src rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
mercurial-bundles/src rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
mercurial-types rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
metaconfig/src rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
py_tar_utils move tar_utils.py from update_rust into an open sourceable location 2017-09-14 13:52:23 -07:00
repoinfo/src rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
revset/src rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
server/src rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
sshrelay/src Initial commit 2017-07-27 18:00:19 -07:00
storage rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
tests Make known protocol check that the commit is fully present 2017-12-04 11:54:53 -08:00
vfs/src rust: mass convert scm/mononoke/... to use failure 2017-12-05 18:11:13 -08:00
CONTRIBUTING.md Initial commit 2017-07-27 18:00:19 -07:00
LICENSE Initial commit 2017-07-27 18:00:19 -07:00
README.md mention in README that Mononoke supports Mercurial 2017-07-28 14:41:37 -07:00
rustfmt.toml config for rustfmt-nightly 0.2.6 2017-09-18 10:50:27 -07:00

Mononoke

Mononoke is a next-generation server for the Mercurial source control system, meant to scale up to accepting thousands of commits every hour across millions of files. It is primarily written in the Rust programming language.

Caveat Emptor

Mononoke 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 Eden.

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:

  • Full support for a standard cargo build.
  • Open source replacements for Facebook-internal services (blob store, logging etc).

The current goal is to get Mononoke working on Linux. Other Unix-like OSes may be supported in the future.