sapling/lib/edenapi
Arun Kulshreshtha 60f8a0938f edenapi: improve progress reporting
Summary:
This diff adds a new progress reporting framework to the Eden API crate and uses it to power progress bars for HTTP file downloads in Mercurial.

The new `ProgressManager` type is designed to aggregate progress values across multiple concurrent HTTP transfers. The API is currently designed to integrate well with libcurl's progress callback API, allowing all of the curl handles within a curl multi session to concurrently report their progress.

This progress can then be reported (in aggregate) to a user-provided callback. In most cases, this callback will be a Rust wrapper around a callback provided by the Python code. The `EdenAPI` trait and FFI bindings have been updated accordingly to allow optionally passing in a callback for long-running operations.

Lastly, in `remotefilelog`'s Python code, the callback is specified as a Python closure that simply updates the progress bar.

Reviewed By: quark-zju

Differential Revision: D15179983

fbshipit-source-id: ee677b71beff730f91aafe0364124f7ea0671387
2019-05-02 14:20:55 -07:00
..
src edenapi: improve progress reporting 2019-05-02 14:20:55 -07:00
Cargo.toml edenapi: switch to CBOR for data serialization 2019-04-15 12:32:25 -07:00