darcs-2.18.2: a distributed, interactive, smart revision control system

Safe Haskell | None
Language | Haskell2010

Darcs.Repository.Pristine

Synopsis

- applyToTentativePristine :: forall (p :: Type -> Type -> Type) wU wR wY. (ApplyState p ~ Tree, RepoPatch p) => Repository 'RW p wU wR -> Invertible (FL (PatchInfoAnd p)) wR wY -> IO ()
- readHashedPristineRoot :: forall (rt :: AccessType) (p :: Type -> Type -> Type) wU wR. Repository rt p wU wR -> IO PristineHash
- pokePristineHash :: PristineHash -> ByteString -> Doc
- peekPristineHash :: ByteString -> PristineHash
- createPristineDirectoryTree :: forall (rt :: AccessType) (p :: Type -> Type -> Type) wU wR. Repository rt p wU wR -> FilePath -> WithWorkingDir -> IO ()
- readPristine :: forall (rt :: AccessType) (p :: Type -> Type -> Type) wU wR. Repository rt p wU wR -> IO (Tree IO)
- writePristine :: forall (rt :: AccessType) (p :: Type -> Type -> Type) wU wR. Repository rt p wU wR -> Tree IO -> IO PristineHash
- convertSizePrefixedPristine :: Cache -> PristineHash -> IO PristineHash

# Documentation

applyToTentativePristine :: forall (p :: Type -> Type -> Type) wU wR wY. (ApplyState p ~ Tree, RepoPatch p) => Repository 'RW p wU wR -> Invertible (FL (PatchInfoAnd p)) wR wY -> IO () #

Apply an `FL` of `Invertible` patches tentative pristine tree, and update the tentative pristine hash. The patches need to be `Invertible` so that we can use it when removing patches from the repository, too.

readHashedPristineRoot :: forall (rt :: AccessType) (p :: Type -> Type -> Type) wU wR. Repository rt p wU wR -> IO PristineHash #

pokePristineHash :: PristineHash -> ByteString -> Doc #

Replace the pristine hash at the start of a raw, unparsed `HeadInventory` or add it if none is present.

peekPristineHash :: ByteString -> PristineHash #

createPristineDirectoryTree :: forall (rt :: AccessType) (p :: Type -> Type -> Type) wU wR. Repository rt p wU wR -> FilePath -> WithWorkingDir -> IO () #

Write the pristine tree into a plain directory at the given path.

readPristine :: forall (rt :: AccessType) (p :: Type -> Type -> Type) wU wR. Repository rt p wU wR -> IO (Tree IO) #

Obtains a Tree corresponding to the "recorded" state of the repository: this is the same as the pristine cache, which is the same as the result of applying all the repository's patches to an empty directory.

writePristine :: forall (rt :: AccessType) (p :: Type -> Type -> Type) wU wR. Repository rt p wU wR -> Tree IO -> IO PristineHash #

Replace the existing pristine with a new one (loaded up in a Tree object). Warning: If `rt ~ 'RO` this overwrites the recorded state, use only when creating a new repo!

convertSizePrefixedPristine :: Cache -> PristineHash -> IO PristineHash #