Skip to content

Commit

Permalink
tools/admin: add CaseConflictSkeletonManifest to blobstore fetch subc…
Browse files Browse the repository at this point in the history
…ommand

Summary: Add `CaseConflictSkeletonManifest` to `blobstore fetch` newadmin subcommand to be able to parse `CCSM` blobs.

Reviewed By: lmvasquezg

Differential Revision: D63317754

fbshipit-source-id: bfacabed79a68b1efcb7c60485f6655f8b7b67b8
  • Loading branch information
YousefSalama authored and facebook-github-bot committed Sep 24, 2024
1 parent 0bde277 commit e21cd24
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions eden/mononoke/tools/admin/src/commands/blobstore/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ use mercurial_types::ShardedHgAugmentedManifest;
use mononoke_types::basename_suffix_skeleton_manifest_v3::BssmV3Directory;
use mononoke_types::basename_suffix_skeleton_manifest_v3::BssmV3Entry;
use mononoke_types::blame_v2::BlameV2;
use mononoke_types::case_conflict_skeleton_manifest::CaseConflictSkeletonManifest;
use mononoke_types::case_conflict_skeleton_manifest::CcsmEntry;
use mononoke_types::deleted_manifest_v2::DeletedManifestV2;
use mononoke_types::fastlog_batch::FastlogBatch;
use mononoke_types::fsnode::Fsnode;
Expand Down Expand Up @@ -107,6 +109,8 @@ pub enum DecodeAs {
BlameV2,
BasenameSuffixSkeletonManifestV3MapNode,
BasenameSuffixSkeletonManifestV3,
CaseConflictSkeletonManifestMapNode,
CaseConflictSkeletonManifest,
ChangesetInfo,
TestManifest,
TestShardedManifest,
Expand Down Expand Up @@ -154,6 +158,11 @@ impl DecodeAs {
DecodeAs::BasenameSuffixSkeletonManifestV3MapNode,
),
("bssm3.", DecodeAs::BasenameSuffixSkeletonManifestV3),
(
"ccsm.map2node.",
DecodeAs::CaseConflictSkeletonManifestMapNode,
),
("ccsm.", DecodeAs::CaseConflictSkeletonManifest),
("testmanifest.", DecodeAs::TestManifest),
(
"testshardedmanifest.map2node.",
Expand Down Expand Up @@ -293,6 +302,14 @@ async fn decode(
DecodeAs::BasenameSuffixSkeletonManifestV3MapNode => Decoded::try_debug(
ShardedMapV2Node::<BssmV3Entry>::from_bytes(&data.into_raw_bytes()),
),
DecodeAs::CaseConflictSkeletonManifest => Decoded::try_debug(
CaseConflictSkeletonManifest::from_bytes(&data.into_raw_bytes()),
),
DecodeAs::CaseConflictSkeletonManifestMapNode => {
Decoded::try_debug(ShardedMapV2Node::<CcsmEntry>::from_bytes(
&data.into_raw_bytes(),
))
}
DecodeAs::ChangesetInfo => {
Decoded::try_debug(ChangesetInfo::from_bytes(&data.into_raw_bytes()))
}
Expand Down

0 comments on commit e21cd24

Please sign in to comment.