Serialize changeset and filelog handling in resolver

Summary:
It is explictly not permitted to ask for filelogs before you've handled changesets, as they are after changesets in stream order.

Force changeset evaluation to finish before filelog evaluation begins

Reviewed By: StanislavGlebik

Differential Revision: D7382355

fbshipit-source-id: 24decd7fe223f8acbc30d42b6c85d89d5ab9edcc
This commit is contained in:
Simon Farnsworth 2018-03-26 05:31:48 -07:00 committed by Facebook Github Bot
parent 86ba6a7715
commit 8ed2d15d2a

View File

@ -176,14 +176,15 @@ impl Bundle2Resolver {
let (c, f) = split_changegroup(parts);
convert_to_revlog_changesets(c)
.collect()
.join(
.and_then(|changesets| {
upload_blobs(
repo.clone(),
convert_to_revlog_filelog(repo, f),
UploadBlobsType::EnsureNoDuplicates,
).context("While uploading File Blobs")
.from_err(),
)
).map(move |filelogs| (changesets, filelogs))
.context("While uploading File Blobs")
.from_err()
})
.map(move |(changesets, filelogs)| {
let cg_push = ChangegroupPush {
part_id,