Safe Haskell | None |
---|---|
Language | Haskell2010 |
Definitions used in this module:
- Explicit dependencies
- The set of patches that a (named) patch depends on "by name", i.e. irrespective of (non-)commutation (non commuting patches are implicit dependencies). The most important example are tags, but non-tag patches can also have explicit dependencies by recording them with --ask-deps.
- Covered
- A patch
p
is covered by a tagt
ift
explicitly depends onp
or a tag covered byt
explicitly depends onp
. In other words, the transitive closure of the relation "is depended on", restricted to situations where the right hand side is a tag. Note that it does not take explicit dependencies of non-tag patches into account at all. - Clean
- A tag
t
in a repository is clean if all patches prior to the tag are covered byt
. Tags normally start out as clean tags (the exception is if --ask-deps is used). It typically becomes unclean when it is merged into another repo (here the exceptions are if --reorder-patches is used, or if the target repo is actually a subset of the source repo).
Synopsis
- getUncovered :: PatchSet rt p wStart wX -> [PatchInfo]
- areUnrelatedRepos :: Commute p => PatchSet rt p Origin wX -> PatchSet rt p Origin wY -> Bool
- findCommonAndUncommon :: forall rt p wX wY. Commute p => PatchSet rt p Origin wX -> PatchSet rt p Origin wY -> Fork (PatchSet rt p) (FL (PatchInfoAnd rt p)) (FL (PatchInfoAnd rt p)) Origin wX wY
- mergeThem :: (Commute p, Merge p) => PatchSet rt p Origin wX -> PatchSet rt p Origin wY -> Sealed (FL (PatchInfoAnd rt p) wX)
- findCommonWithThem :: Commute p => PatchSet rt p Origin wX -> PatchSet rt p Origin wY -> (PatchSet rt p :> FL (PatchInfoAnd rt p)) Origin wX
- countUsThem :: Commute p => PatchSet rt p Origin wX -> PatchSet rt p Origin wY -> (Int, Int)
- removeFromPatchSet :: (Commute p, Eq2 p) => FL (PatchInfoAnd rt p) wX wY -> PatchSet rt p wStart wY -> Maybe (PatchSet rt p wStart wX)
- slightlyOptimizePatchset :: PatchSet rt p wStart wX -> PatchSet rt p wStart wX
- splitOnTag :: Commute p => PatchInfo -> PatchSet rt p wStart wX -> Maybe (PatchSet rt p wStart wX)
- patchSetUnion :: (Commute p, Merge p, Eq2 p) => [SealedPatchSet rt p Origin] -> SealedPatchSet rt p Origin
- patchSetIntersection :: Commute p => [SealedPatchSet rt p Origin] -> SealedPatchSet rt p Origin
- findUncommon :: Commute p => PatchSet rt p Origin wX -> PatchSet rt p Origin wY -> (FL (PatchInfoAnd rt p) :\/: FL (PatchInfoAnd rt p)) wX wY
- cleanLatestTag :: Commute p => PatchSet rt p wStart wX -> PatchSet rt p wStart wX
- contextPatches :: PatchSet rt p wX wY -> (PatchSet rt p :> RL (PatchInfoAnd rt p)) wX wY
Documentation
getUncovered :: PatchSet rt p wStart wX -> [PatchInfo] Source #
areUnrelatedRepos :: Commute p => PatchSet rt p Origin wX -> PatchSet rt p Origin wY -> Bool Source #
findCommonAndUncommon :: forall rt p wX wY. Commute p => PatchSet rt p Origin wX -> PatchSet rt p Origin wY -> Fork (PatchSet rt p) (FL (PatchInfoAnd rt p)) (FL (PatchInfoAnd rt p)) Origin wX wY Source #
mergeThem :: (Commute p, Merge p) => PatchSet rt p Origin wX -> PatchSet rt p Origin wY -> Sealed (FL (PatchInfoAnd rt p) wX) Source #
findCommonWithThem :: Commute p => PatchSet rt p Origin wX -> PatchSet rt p Origin wY -> (PatchSet rt p :> FL (PatchInfoAnd rt p)) Origin wX Source #
countUsThem :: Commute p => PatchSet rt p Origin wX -> PatchSet rt p Origin wY -> (Int, Int) Source #
removeFromPatchSet :: (Commute p, Eq2 p) => FL (PatchInfoAnd rt p) wX wY -> PatchSet rt p wStart wY -> Maybe (PatchSet rt p wStart wX) Source #
slightlyOptimizePatchset :: PatchSet rt p wStart wX -> PatchSet rt p wStart wX Source #
splitOnTag :: Commute p => PatchInfo -> PatchSet rt p wStart wX -> Maybe (PatchSet rt p wStart wX) Source #
Take a tag's PatchInfo
, and a PatchSet
, and attempt to find the tag in
the PatchSet
. If found, return a new PatchSet
, in which the tag is now
clean (and the last of the Tagged
list), while all patches that are not
covered by the tag are in the trailing list of patches.
If the tag is not in the PatchSet
, we return Nothing
.
patchSetUnion :: (Commute p, Merge p, Eq2 p) => [SealedPatchSet rt p Origin] -> SealedPatchSet rt p Origin Source #
patchSetIntersection :: Commute p => [SealedPatchSet rt p Origin] -> SealedPatchSet rt p Origin Source #
findUncommon :: Commute p => PatchSet rt p Origin wX -> PatchSet rt p Origin wY -> (FL (PatchInfoAnd rt p) :\/: FL (PatchInfoAnd rt p)) wX wY Source #
cleanLatestTag :: Commute p => PatchSet rt p wStart wX -> PatchSet rt p wStart wX Source #
Reorder a PatchSet
such that the latest tag becomes clean.
contextPatches :: PatchSet rt p wX wY -> (PatchSet rt p :> RL (PatchInfoAnd rt p)) wX wY Source #
Split a PatchSet
at the latest clean tag. The left part is what comes
before the tag, the right part is the tag and its non-dependencies.