darcs-2.18.3: a distributed, interactive, smart revision control system
Safe HaskellSafe-Inferred
LanguageHaskell2010

Darcs.Repository.Inventory

Synopsis

Documentation

readPatchesFromInventoryFile :: (PatchListFormat p, ReadPatch p) => FilePath -> Repository rt p wU wR -> IO (PatchSet p Origin wS) Source #

Read a PatchSet starting with a specific inventory inside a Repository.

readPatchesFromInventory :: (PatchListFormat p, ReadPatch p) => Cache -> Inventory -> IO (SealedPatchSet p Origin) Source #

Read a complete PatchSet from a Cache, by following the chain of Inventorys, starting with the given one.

readSinglePatch :: ReadPatch p => Cache -> PatchInfo -> PatchHash -> IO (Sealed (p wX)) Source #

Read a single patch from a Cache, given its PatchInfo and PatchHash. Fails with an error message if the patch file cannot be parsed.

writePatchIfNecessary :: RepoPatch p => Cache -> PatchInfoAnd p wX wY -> IO InventoryEntry Source #

Write a PatchInfoAnd to disk and return an InventoryEntry i.e. the patch info and hash. However, if we patch already contains a hash, assume it has already been written to disk at some point and merely return the info and hash.

writeHashFile :: ValidHash h => Cache -> Doc -> IO h Source #

Wrapper around writeFileUsingCache that takes a Doc instead of a ByteString.