mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 09:48:05 +03:00
60f8a0938f
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 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |