convert git-annex branch access to ByteStrings and Builders
Most of the individual logs are not converted yet, only presense logs have an efficient ByteString Builder implemented so far. The rest convert to and from String.
This commit is contained in:
parent
53905490df
commit
bfc9039ead
27 changed files with 163 additions and 120 deletions
|
@ -30,7 +30,7 @@ describeUUID :: UUID -> UUIDDesc -> Annex ()
|
|||
describeUUID uuid desc = do
|
||||
c <- liftIO currentVectorClock
|
||||
Annex.Branch.change uuidLog $
|
||||
showLog id . changeLog c uuid (fromUUIDDesc desc) . fixBadUUID . parseLog Just
|
||||
encodeBL . showLog id . changeLog c uuid (fromUUIDDesc desc) . fixBadUUID . parseLog Just . decodeBL
|
||||
|
||||
{- Temporarily here to fix badly formatted uuid logs generated by
|
||||
- versions 3.20111105 and 3.20111025.
|
||||
|
@ -71,7 +71,7 @@ uuidDescMap = maybe uuidDescMapLoad return =<< Annex.getState Annex.uuiddescmap
|
|||
- it may not have been described and otherwise would not appear. -}
|
||||
uuidDescMapLoad :: Annex UUIDDescMap
|
||||
uuidDescMapLoad = do
|
||||
m <- (simpleMap . parseLog (Just . UUIDDesc . encodeBS))
|
||||
m <- (simpleMap . parseLog (Just . UUIDDesc . encodeBS)) . decodeBL
|
||||
<$> Annex.Branch.get uuidLog
|
||||
u <- Annex.UUID.getUUID
|
||||
let m' = M.insertWith preferold u mempty m
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue