darcs-2.18.5: a distributed, interactive, smart revision control system
Safe HaskellNone
LanguageHaskell2010

Darcs.Repository.Inventory

Synopsis

Documentation

readPatchesFromInventoryFile :: forall (p :: Type -> Type -> Type) (rt :: AccessType) wU wR wS. (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 :: forall (p :: Type -> Type -> Type). (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 :: forall (p :: Type -> Type -> Type) wX. 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.

readOneInventory :: forall (p :: Type -> Type -> Type) wX. ReadPatch p => Cache -> FilePath -> IO (Sealed (RL (PatchInfoAndG p) wX)) Source #

writeInventory :: forall (p :: Type -> Type -> Type) wX. RepoPatch p => String -> Cache -> PatchSet p Origin wX -> IO InventoryHash Source #

writePatchIfNecessary :: forall (p :: Type -> Type -> Type) wX wY. 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.