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

Safe HaskellNone
LanguageHaskell2010

Darcs.Patch.Set

Synopsis

Documentation

data PatchSet rt p wStart wY where Source #

The patches in a repository are stored in chunks broken up at "clean" tags. A tag is clean if the only patches before it in the current repository ordering are ones that the tag depends on (either directly or indirectly). Each chunk is stored in a separate inventory file on disk.

A PatchSet represents a repo's history as the list of patches since the last clean tag, and then a list of patch lists each delimited by clean tags.

Because the invariants about clean tags can only be maintained if a PatchSet contains the whole history, the first witness is always forced to be Origin. The type still has two witnesses so it can easily be used with combinators like :> and Fork.

The history is lazily loaded from disk so does not normally need to be all kept in memory.

Constructors

PatchSet :: RL (Tagged rt p) Origin wX -> RL (PatchInfoAnd rt p) wX wY -> PatchSet rt p Origin wY 
Instances
Show2 p => Show2 (PatchSet rt p) Source # 
Instance details

Defined in Darcs.Patch.Set

Methods

showDict2 :: ShowDict (PatchSet rt p wX wY) Source #

Show2 p => Show1 (PatchSet rt p wStart) Source # 
Instance details

Defined in Darcs.Patch.Set

Methods

showDict1 :: Dict (Show (PatchSet rt p wStart wX)) Source #

Show2 p => Show (PatchSet rt p wStart wY) Source # 
Instance details

Defined in Darcs.Patch.Set

Methods

showsPrec :: Int -> PatchSet rt p wStart wY -> ShowS #

show :: PatchSet rt p wStart wY -> String #

showList :: [PatchSet rt p wStart wY] -> ShowS #

data Tagged rt p wX wZ where Source #

A Tagged is a single chunk of a PatchSet. It has a PatchInfo representing a clean tag, the hash of the previous inventory (if it exists), and the list of patches since that previous inventory.

Constructors

Tagged :: PatchInfoAnd rt p wY wZ -> Maybe String -> RL (PatchInfoAnd rt p) wX wY -> Tagged rt p wX wZ 
Instances
Show2 p => Show2 (Tagged rt p) Source # 
Instance details

Defined in Darcs.Patch.Set

Methods

showDict2 :: ShowDict (Tagged rt p wX wY) Source #

Show2 p => Show1 (Tagged rt p wX) Source # 
Instance details

Defined in Darcs.Patch.Set

Methods

showDict1 :: Dict (Show (Tagged rt p wX wX0)) Source #

Show2 p => Show (Tagged rt p wX wZ) Source # 
Instance details

Defined in Darcs.Patch.Set

Methods

showsPrec :: Int -> Tagged rt p wX wZ -> ShowS #

show :: Tagged rt p wX wZ -> String #

showList :: [Tagged rt p wX wZ] -> ShowS #

type SealedPatchSet rt p wStart = Sealed (PatchSet rt p wStart) Source #

data Origin Source #

Origin is a type used to represent the initial context of a repo.

progressPatchSet :: String -> PatchSet rt p wStart wX -> PatchSet rt p wStart wX Source #

Runs a progress action for each tag and patch in a given PatchSet, using the passed progress message. Does not alter the PatchSet.

patchSetTags :: PatchSet rt p wX wY -> [String] Source #

The tag names of all tags of a given PatchSet.

appendPSFL :: PatchSet rt p wStart wX -> FL (PatchInfoAnd rt p) wX wY -> PatchSet rt p wStart wY Source #

appendPSFL takes a PatchSet and a FL of patches that "follow" the PatchSet, and concatenates the patches into the PatchSet.

patchSet2RL :: PatchSet rt p wStart wX -> RL (PatchInfoAnd rt p) wStart wX Source #

patchSet2RL takes a PatchSet and returns an equivalent, linear RL of patches.

patchSet2FL :: PatchSet rt p wStart wX -> FL (PatchInfoAnd rt p) wStart wX Source #

patchSet2FL takes a PatchSet and returns an equivalent, linear FL of patches.

patchSetSnoc :: PatchSet rt p wX wY -> PatchInfoAnd rt p wY wZ -> PatchSet rt p wX wZ Source #

patchSetSplit :: PatchSet rt p wX wY -> (PatchSet rt p :> RL (PatchInfoAnd rt p)) wX wY Source #

Split a PatchSet before the latest known clean tag. The left part is what comes before the tag, the right part is the tag and its non-dependencies.

patchSetDrop :: Int -> PatchSet rt p wStart wX -> SealedPatchSet rt p wStart Source #

Drop the last n patches from the given PatchSet.