This commit is contained in:
voidlizard 2025-01-20 09:37:45 +03:00
parent 4ba2f040ae
commit 8bb17eaafb
2 changed files with 21 additions and 8 deletions

View File

@ -129,12 +129,14 @@ initRepo syn = do
, mkForm "seed" [mkInt seed]
, mkForm "public" []
, mkForm "reflog" [mkSym (show $ pretty (AsBase58 rpk))]
] & vcat . fmap pretty
]
tree <- createTreeWithMetadata sto Nothing mempty (LBS8.pack (show $ manifest))
let mfs = vcat $ fmap pretty manifest
tree <- createTreeWithMetadata sto Nothing mempty (LBS8.pack (show $ mfs))
>>= orThrowPassIO
liftIO $ print tree
liftIO $ print $ pretty $ mkForm "manifest" manifest
let pt = toPTree (MaxSize defHashListChunk) (MaxNum defTreeChildNum) [tree]

View File

@ -68,11 +68,21 @@ theDict = do
[ StringLike x ] -> helpList False (Just x) >> quit
_ -> helpList False Nothing >> quit
entry $ bindMatch "compression" $ nil_ $ \case
[ LitIntVal n ] -> lift do
setCompressionLevel (fromIntegral n)
brief "set zstd compression level" do
examples [qc|
compression best ; sets compression level to best (22)
compression 4 ; sets low compression level (faster)
compression ; prints compression level
|] do
entry $ bindMatch "compression" $ nil_ $ \case
[ LitIntVal n ] -> lift do
setCompressionLevel (fromIntegral n)
_ -> throwIO (BadFormException @C nil)
[] -> lift do
co <- getCompressionLevel
liftIO $ print $ pretty co
_ -> throwIO (BadFormException @C nil)
entry $ bindMatch "segment" $ nil_ $ \case
[ LitIntVal n ] -> lift do
@ -462,7 +472,8 @@ theDict = do
entry $ bindMatch "reflog:refs" $ nil_ $ \syn -> lift $ connectedDo do
rrefs <- importedRefs
liftIO $ print $ pretty rrefs
for_ rrefs $ \(r,h) -> do
liftIO $ print $ fill 20 (pretty h) <+> pretty r
entry $ bindMatch "reflog:imported" $ nil_ $ \syn -> lift $ connectedDo do
p <- importedCheckpoint