mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
d654ee8107
Summary: This diff does the following: 1. makes `megarepo_add_sync_target` into an async call 2. wraps all the async call responses into an additional struct to convey the idea of pending requests 3. fixes code which imports/implements these interfaces 1 is needed because adding a new target will need to create an initial state of the megarepo (so not just write some configs), and that is an expensive operation. 2 is needed because we don't want to express the idea of "this request is not yet processed" through a thrift exception. Instead, let make `_poll` calls return a struct with a single optional field. When present, that field will contain the payload of response to the underlying request. When absent, it will indicate the fact that the request is still pending. Of course, this is a compatibility-breaking change, that's why I want to get it in as early as possible (while there are no real clients calling changed methods). Reviewed By: StanislavGlebik Differential Revision: D27823377 fbshipit-source-id: dc2a5ed327b38d1cacd575af9d7edf5768f9c377 |
||
---|---|---|
.. | ||
src | ||
metadata.cpp | ||
metadata.h | ||
metadata.rs |