follow-on changes from MetaData type changes
Including writing and parsing the metadata log files with bytestring-builder and attoparsec.
This commit is contained in:
parent
16c798b5ef
commit
cb375977a6
14 changed files with 102 additions and 81 deletions
|
@ -26,7 +26,7 @@ import Annex.VectorClock
|
|||
import qualified Data.Set as S
|
||||
|
||||
readLog :: (Ord v, SingleValueSerializable v) => FilePath -> Annex (Log v)
|
||||
readLog = parseLog . decodeBL <$$> Annex.Branch.get
|
||||
readLog = parseLog <$$> Annex.Branch.get
|
||||
|
||||
getLog :: (Ord v, SingleValueSerializable v) => FilePath -> Annex (Maybe v)
|
||||
getLog = newestValue <$$> readLog
|
||||
|
@ -35,4 +35,4 @@ setLog :: (SingleValueSerializable v) => FilePath -> v -> Annex ()
|
|||
setLog f v = do
|
||||
c <- liftIO currentVectorClock
|
||||
let ent = LogEntry c v
|
||||
Annex.Branch.change f $ \_old -> encodeBL (showLog (S.singleton ent))
|
||||
Annex.Branch.change f $ \_old -> buildLog (S.singleton ent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue