Summary:
Part of the larger project to modify Future<T>::then to be r-value qualified and use Future<T>::thenTry or Future<T>::thenValue.
The goal is to disambiguate folly::Future and to improve type and lifetime safety of Future and its methods.
Codemod:
future<T>.then(callable with operator()(not-a-try)) to future<T>.thenValue(callable with operator()(not-a-try)).
future<T>.then(callable with operator()()) to future<T>.thenValue(callable with operator()(auto&&)).
future<T>.then(callable with operator()(auto)) to future<T>.thenValue(callable with operator()(auto)).
future<T>.then(callable with operator()(folly::Try<T>)) to future<T>.thenTry(callable)
Reviewed By: Orvid
Differential Revision: D9819578
fbshipit-source-id: f9e31f47354c041ecbf0a90953cbe50ebfda6adc
Summary:
Move the HgProxyHash code out of HgImporter.cpp and into its own top-level
file. This does not have any functional changes other than moving the code
around.
This will make it easier to perform HgProxyHash operation from inside
HgBackingStore.cpp. Currently all of the HgProxyHash operations are done from
inside HgImporter threads. This operation does not need to be done in the
importer threads however, and for operations like putBatch() that complete
asynchronously it generally should not be done from the HgImporter threads.
Reviewed By: wez
Differential Revision: D8438776
fbshipit-source-id: 344652f47e5ccdc6ef20b143dc52d0eeac2886e6