Skip to content

Commit 8fc8b78

Browse files
Liubov Dmitrievafacebook-github-bot
authored andcommitted
start writing the #2 version of the format
Summary: start write the version #2 of the format the format v2 was introduced a long while ago (more than a month), now new code is everywhere capable of reading the new format. Let's move on and write the v2 format. Reviewed By: muirdm Differential Revision: D58591864 fbshipit-source-id: d86fe4c8521d2cd66cd5f7a905da64f82d1eb204
1 parent 3c86918 commit 8fc8b78

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

eden/scm/lib/revisionstore/src/indexedlogauxstore.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,29 +45,13 @@ pub(crate) type Entry = FileAuxData;
4545
/// (v0) also contained content_id hash and blake3 hash was optional,
4646
/// also, size field was close to the end, just before the blake3
4747
pub(crate) fn serialize(this: &FileAuxData, hgid: HgId) -> Result<Bytes> {
48-
// Write an original format for the migration period.
49-
// version 0
50-
let mut buf = Vec::new();
51-
buf.write_all(hgid.as_ref())?;
52-
buf.write_u8(0)?; // write version
53-
buf.write_all(edenapi_types::ContentId::default().as_ref())?;
54-
buf.write_all(this.sha1.as_ref())?;
55-
buf.write_all(edenapi_types::Sha256::default().as_ref())?;
56-
buf.write_vlq(this.total_size)?;
57-
buf.write_u8(1)?; // A value of 1 indicates the blake3 hash is present
58-
buf.write_all(this.blake3.as_ref())?;
59-
Ok(buf.into())
60-
61-
// TODO(liubovd): finish roll out of the new format after 05-22-2024
62-
/* New format (tested)
6348
let mut buf = Vec::new();
6449
buf.write_all(hgid.as_ref())?;
6550
buf.write_u8(2)?; // write version
6651
buf.write_vlq(this.total_size)?;
6752
buf.write_all(this.sha1.as_ref())?;
6853
buf.write_all(this.blake3.as_ref())?;
6954
Ok(buf.into())
70-
*/
7155
}
7256

7357
fn deserialize(bytes: Bytes) -> Result<Option<(HgId, FileAuxData)>> {

0 commit comments

Comments
 (0)