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
|
@ -32,14 +32,14 @@ scheduleSet :: UUID -> [ScheduledActivity] -> Annex ()
|
|||
scheduleSet uuid@(UUID _) activities = do
|
||||
c <- liftIO currentVectorClock
|
||||
Annex.Branch.change scheduleLog $
|
||||
showLog id . changeLog c uuid val . parseLog Just
|
||||
encodeBL . showLog id . changeLog c uuid val . parseLog Just . decodeBL
|
||||
where
|
||||
val = fromScheduledActivities activities
|
||||
scheduleSet NoUUID _ = error "unknown UUID; cannot modify"
|
||||
|
||||
scheduleMap :: Annex (M.Map UUID [ScheduledActivity])
|
||||
scheduleMap = simpleMap
|
||||
. parseLogWithUUID parser
|
||||
. parseLogWithUUID parser . decodeBL
|
||||
<$> Annex.Branch.get scheduleLog
|
||||
where
|
||||
parser _uuid = eitherToMaybe . parseScheduledActivities
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue