mirror of
https://github.com/facebook/sapling.git
synced 2024-12-28 07:33:10 +03:00
lfs: use hg-http built client for network requests
Summary: This client provides automatic metrics collection. Reviewed By: kulshrax Differential Revision: D23577871 fbshipit-source-id: 137299222a20bc8e4d52c3321febbb91d861b236
This commit is contained in:
parent
046db98222
commit
1c172c9008
@ -23,6 +23,7 @@ futures = "0.3"
|
||||
hex = "0.4"
|
||||
http = "0.2"
|
||||
http-client = { path = "../http-client" }
|
||||
hg-http= { path = "../hg-http" }
|
||||
indexedlog = { path = "../indexedlog" }
|
||||
lz4-pyframe = { path = "../lz4-pyframe" }
|
||||
memmap = "0.7.0"
|
||||
|
@ -42,6 +42,7 @@ use configparser::{
|
||||
config::ConfigSet,
|
||||
hg::{ByteCount, ConfigSetHgExt},
|
||||
};
|
||||
use hg_http::http_client;
|
||||
use http_client::{HttpClient, Method, Request};
|
||||
use indexedlog::log::IndexOutput;
|
||||
use lfs_protocol::{
|
||||
@ -1225,7 +1226,7 @@ impl LfsRemote {
|
||||
let request_timeout =
|
||||
Duration::from_millis(config.get_or("lfs", "requesttimeout", || 10_000)?);
|
||||
|
||||
let client = HttpClient::new();
|
||||
let client = http_client("lfs");
|
||||
|
||||
Ok(Self {
|
||||
shared,
|
||||
|
Loading…
Reference in New Issue
Block a user