mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
mononoke: remove unused pushrebase_changegroup_part
Summary: It's unused. Reviewed By: yancouto Differential Revision: D31573897 fbshipit-source-id: 3fdb1a2bf7bcc13fda024a7be42a3708ae26825e
This commit is contained in:
parent
9b3f8b8704
commit
78b7074edd
@ -137,42 +137,6 @@ where
|
||||
Ok(builder)
|
||||
}
|
||||
|
||||
pub fn pushrebase_changegroup_part<CS, FS>(
|
||||
changelogentries: CS,
|
||||
filenodeentries: FS,
|
||||
onto_bookmark: impl AsRef<str>,
|
||||
) -> Result<PartEncodeBuilder>
|
||||
where
|
||||
CS: Stream<Item = (HgNodeHash, HgBlobNode), Error = Error> + Send + 'static,
|
||||
FS: Stream<Item = (MPath, Vec<FilenodeEntry>), Error = Error> + Send + 'static,
|
||||
{
|
||||
let mut builder = PartEncodeBuilder::mandatory(PartHeaderType::B2xRebase)?;
|
||||
builder.add_mparam(
|
||||
"onto",
|
||||
BytesNew::copy_from_slice(onto_bookmark.as_ref().as_bytes()),
|
||||
)?;
|
||||
|
||||
let version = CgVersion::Cg2Version;
|
||||
builder.add_aparam(
|
||||
"cgversion",
|
||||
BytesNew::copy_from_slice(version.to_str().as_bytes()),
|
||||
)?;
|
||||
|
||||
let changelogentries = convert_changeset_stream(changelogentries, version)
|
||||
.chain(once(Ok(Part::SectionEnd(Section::Changeset))))
|
||||
// One more SectionEnd entry is necessary because hg client excepts filelog section
|
||||
// even if it's empty. Add a fake SectionEnd part (the choice of
|
||||
// Manifest is just for convenience).
|
||||
.chain(once(Ok(Part::SectionEnd(Section::Manifest))))
|
||||
.chain(convert_file_stream(filenodeentries, version))
|
||||
.chain(once(Ok(Part::End)));
|
||||
|
||||
let cgdata = CgPacker::new(changelogentries);
|
||||
builder.set_data_generated(cgdata);
|
||||
|
||||
Ok(builder)
|
||||
}
|
||||
|
||||
fn convert_changeset_stream<S>(
|
||||
changelogentries: S,
|
||||
version: CgVersion,
|
||||
|
Loading…
Reference in New Issue
Block a user