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

Darcs.Repository.Pristine

Synopsis

Documentation

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

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.

pokePristineHash :: PristineHash -> ByteString -> Doc Source #

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

createPristineDirectoryTree :: Repository rt p wU wR -> FilePath -> WithWorkingDir -> IO () Source #

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

readPristine :: Repository rt p wU wR -> IO (Tree IO) Source #

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 :: Repository rt p wU wR -> Tree IO -> IO PristineHash Source #

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!