A Scalable, User-Friendly Source Control System.
Go to file
Jeremy Fitzhardinge 4f7f38c1a0 rust/failure_ext: add .chain()/Chain
Summary:
Add a type to explicitly model a causal chain of errors, akin to
error_chain. This looks a lot like Context, but is intended to show the entire
stack of errors rather than deciding that only the top-level one is
interesting.

This adds a `ChainExt` trait, which adds a `.chain_ext(OuterError)` method to
add another step to the causal chain. This is implemented for:
- `F` where `F: Fail`
- `Error`
- `Result<_, F>` where `F: Fail`
- `Result<_, Error>`
- `Future`/`Stream<Error=F>` where `F: Fail`
- `Future`/`Stream<Error=Error>`
- `Chain`

Using it is simple:
```
let res = something_faily().chain_err(LocalError::new("Something amiss"))?;
```
where `something_faily()` returns any of the above types.

(This is done by adding an extra dummy marker type parameter to the `ChainExt`
trait so that it can avoid problems with the coherence rules - thanks for the idea @[100000771202578:kulshrax]!)

Reviewed By: lukaspiatkowski

Differential Revision: D9394192

fbshipit-source-id: 0817844d283b3900d2555f526c2683231ca7fe12
2018-09-06 14:24:08 -07:00
apiserver refactor actors to simple struct 2018-08-31 14:07:17 -07:00
async-compression async-compression: replace tokio_core with tokio::runtime 2018-07-17 04:54:59 -07:00
asyncmemo Add travis-CI integration by adding .travis.yml file. 2018-07-26 10:09:32 -07:00
blobrepo mononoke: remove unused options 2018-09-03 04:06:14 -07:00
blobrepo_utils mononoke: use ChangesetId in Changesets 2018-08-06 10:36:43 -07:00
blobstore Make all bindings fully exception-safe 2018-08-07 13:37:08 -07:00
bonsai-hg-mapping Use blocking in asynchronize as well as spawning a task 2018-09-05 12:23:49 -07:00
bonsai-utils bonsai-utils/diff: add ChangedReusedId state 2018-07-31 10:36:31 -07:00
bookmarks store bonsai changesets in bookmarks instead of hg changesets 2018-08-15 07:36:15 -07:00
bundle2-resolver mononoke: return bundle to the client in pushrebase 2018-09-06 06:53:57 -07:00
bytes-ext add cargo build support for local development 2018-02-22 04:30:32 -08:00
cache-warmup/src blobrepo: add get_filenode method to simplify filenode access 2018-08-10 10:06:27 -07:00
changesets Use blocking in asynchronize as well as spawning a task 2018-09-05 12:23:49 -07:00
cmdlib/src mononoke: remove unused options 2018-09-03 04:06:14 -07:00
cmds mononoke: add json flag to mononoke admin tool 2018-09-06 09:23:20 -07:00
common Back out "Reuse pylz4 encoding between hg and Mononoke into a separate library" 2018-08-08 15:23:56 -07:00
docs CODEMOD: rename mercurial::Parents to HgParents 2018-04-16 03:40:25 -07:00
eden_server Add Cargo.toml files to crates. (#7) 2018-07-09 19:52:27 -07:00
failure_ext rust/failure_ext: add .chain()/Chain 2018-09-06 14:24:08 -07:00
filenodes Use blocking in asynchronize as well as spawning a task 2018-09-05 12:23:49 -07:00
futures-ext Split asynchronize into useful components 2018-09-05 12:23:49 -07:00
hgcli Futures split Stats into FutureStats and TimedStats 2018-08-17 13:07:24 -07:00
hgproto mononoke: hgproto: make encoding response take ownership of the response 2018-08-31 10:23:49 -07:00
hook_tailer added pushrebase configuration options 2018-08-31 08:55:19 -07:00
hooks added pushrebase configuration options 2018-08-31 08:55:19 -07:00
hooks_old/src mononoke: use ChangesetId in Changesets 2018-08-06 10:36:43 -07:00
mercurial clean up HgBlob and HgBlobHash 2018-08-19 15:52:34 -07:00
mercurial-bundles clean up HgBlob and HgBlobHash 2018-08-19 15:52:34 -07:00
mercurial-types clean up HgBlob and HgBlobHash 2018-08-19 15:52:34 -07:00
metaconfig mononoke: remove unused options 2018-09-03 04:06:14 -07:00
mononoke-api/src get/generate hg changeset from bonsai changeset 2018-07-31 11:36:14 -07:00
mononoke-types added pushrebase configuration options 2018-08-31 08:55:19 -07:00
netstring/src 'Re-sync with internal repository' 2018-07-26 09:09:45 -07:00
py_tar_utils move tar_utils.py from update_rust into an open sourceable location 2017-09-14 13:52:23 -07:00
reachabilityindex/src Refactor SkiplistIndex to handle large depth indexing 2018-08-13 17:36:13 -07:00
ready_state/src server: split server binary crate into 4 separate crates 2018-07-17 04:54:58 -07:00
repo_client/src mononoke: move getbundle response creation in bundle2resolver 2018-09-06 06:53:57 -07:00
revset mononoke: replace Arc<BlobRepo> with BlobRepo 2018-09-06 05:23:35 -07:00
server Use tokio::timer::Timeout 2018-08-31 15:37:30 -07:00
sshrelay Add Cargo.toml files to crates. (#7) 2018-07-09 19:52:27 -07:00
storage Add Cargo.toml files to crates. (#7) 2018-07-09 19:52:27 -07:00
tests mononoke: return bundle to the client in pushrebase 2018-09-06 06:53:57 -07:00
vfs Add Cargo.toml files to crates. (#7) 2018-07-09 19:52:27 -07:00
.gitignore add .gitignore 2018-03-13 11:58:20 -07:00
.travis.yml Add travis-CI integration by adding .travis.yml file. 2018-07-26 10:09:32 -07:00
Cargo.toml Restore cachelib blob caching 2018-08-07 11:37:37 -07:00
CONTRIBUTING.md Initial commit 2017-07-27 18:00:19 -07:00
LICENSE Initial commit 2017-07-27 18:00:19 -07:00
packman.yml packman config file for admin tool 2018-06-04 22:09:49 -07:00
README.md mention in README that Mononoke supports Mercurial 2017-07-28 14:41:37 -07:00
rustfmt.toml updates for rustfmt 0.3.4 2018-01-05 12:07:01 -08: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.