Summary:
Parse the unbundle command as an `unbundle` command with its `heads`
parameter, followed by a bundle2 stream which is parsed in order to capture it
as bytes, as a simulation of an actual stream.
Reviewed By: sid0
Differential Revision: D6209818
fbshipit-source-id: 9bc454319350e2047160347964740f3a3d2f592f
Summary:
Even though the parameter is called `heads`, it's not necessarily heads.
It can be:
1) hex-encoded word "force" - "666f726365"
2) Hex-encoded list of heads
3) hex encoded word "hashed" and a hash of heads' hashes.
Proof: https://www.mercurial-scm.org/repo/hg/file/tip/mercurial/wireproto.py#l362
Previously we just parsed list of hashes, and it wasn't correct. This diff fixes it
Reviewed By: jsgf
Differential Revision: D6110315
fbshipit-source-id: 57ca12d13e3b719803b20ae1718d5f4309b806f5
Summary:
There are few changes here:
- split main into more smaller functions
- add panic hook that exits the process if one of the threads paniced
- use never_type feature to better type functions that should never return
- few panics to error returning changes here and there
Reviewed By: farnz
Differential Revision: D5942238
fbshipit-source-id: 7407d95b61f64f3909c5bb14dd3aa1ddee452f3c
Summary: This diffs reverts D5842977 and adds fetching mononoke-config inside tupperware, so that it can be served by mononoke server
Reviewed By: StanislavGlebik
Differential Revision: D5866239
fbshipit-source-id: 6f3fd794e5274c8bab0c50efc9c95e31f88be688
Summary:
We're going to add more stores like obsmarkers and linknodes very
soon. Stuffing all of them into type parameters is going to get ugly very soon.
Instead, add a trait which represents all the state, and make `BlobRepo`
generic on that trait. Add a few implementations for common use cases like
files and RocksDB-based stores.
This allows the dependency lists for the Mononoke and Eden servers to be more
straightforward.
Reviewed By: jsgf
Differential Revision: D5850372
fbshipit-source-id: 37a0687611687b9616ebbddce70f53e1e5d3267b
Summary: The idea is to deploy a no-op mononoke server to tupperware and slowly add more parts like fb303 page, proper args for startup etc.
Reviewed By: farnz
Differential Revision: D5842977
fbshipit-source-id: 227d144b71132e73b76ce7067ac998b1945cb5e1
Summary:
Finally got an update working by removing the `mysql_async` crate.
Some notes:
* The `mysql_async` crate was responsible in this case: see https://github.com/rust-lang/cargo/issues/4066#issuecomment-328210204 for why.
* tokio/futures deprecated a bunch of stuff. I've filed a TODO for now.
* We finally pulled in error-chain 0.11, which has a bunch of nice improvements.
Reviewed By: kulshrax
Differential Revision: D5798282
fbshipit-source-id: a38a7b17ee0205428e2ea63334722aa408582493
Summary: Loosen type constraint on the error slightly, and rustfmt.
Reviewed By: sid0
Differential Revision: D5764616
fbshipit-source-id: 265071f775fac5ea40e8ba45a7da961904b3b397
Summary: The `boxfnonce` crate is a workaround for the lack of `FnBox` in stable Rust. Without it, it isn't possible to call a `Box<FnOnce>`.
Reviewed By: jsgf
Differential Revision: D5626687
fbshipit-source-id: 01ab37b98add5dae10f3c4834c2a330593639ab6
Summary: As per title. This includes fixes by kulshrax to make things not break.
Reviewed By: jsgf
Differential Revision: D5569907
fbshipit-source-id: f6a4ad88b33caf8c8de3ef8db7932d36993e4e95
Summary:
Server can construct boxed Repo instances, and performs all client protocol operations in terms of trait methods. This allows the repo to be set dynamically.
This currently makes the repo type a single setting which applies to all repos; this can be generalized to a per-repo setting later.
Reviewed By: sid0
Differential Revision: D5540670
fbshipit-source-id: ac450b078849d9bd65d6e3dc91b73d652ca86ce7
Summary:
In practice, no users of Bookmarks will not want listing, and all
implementations need to be able to support it.
Reviewed By: StanislavGlebik
Differential Revision: D5540672
fbshipit-source-id: d64a3894c7cd14d329bd23809525935461289bc3