| ||||||||||
| ||||||||||
| Synopsis | ||||||||||
| Documentation | ||||||||||
| get_common_and_uncommon :: RepoPatch p => (PatchSet p, PatchSet p) -> ([PatchInfo], RL (RL (PatchInfoAnd p)) :\/: RL (RL (PatchInfoAnd p))) | ||||||||||
| get_common_and_uncommon_or_missing :: RepoPatch p => (PatchSet p, PatchSet p) -> Either PatchInfo ([PatchInfo], RL (RL (PatchInfoAnd p)) :\/: RL (RL (PatchInfoAnd p))) | ||||||||||
| get_common_and_uncommon_err :: RepoPatch p => (PatchSet p, PatchSet p) -> Either MissingPatch ([PatchInfo], RL (RL (PatchInfoAnd p)) :\/: RL (RL (PatchInfoAnd p))) | ||||||||||
| with_partial_intersection :: forall a p. RepoPatch p => PatchSet p -> PatchSet p -> (PatchSet p -> RL (PatchInfoAnd p) -> RL (PatchInfoAnd p) -> a) -> a | ||||||||||
with_partial_intersection takes two PatchSets and splits them into a common intersection portion and two sets of patches. The intersection, however, is only lazily determined, so there is no guarantee that all intersecting patches will be included in the intersection PatchSet. This is a pretty efficient function, because it makes use of the already-broken-up nature of PatchSets. PatchSets have the property that if (info $ last $ head a) == (info $ last $ head b) then (tail a) and (tail b) are identical repositories, and we want to take advantage of this if possible, to avoid reading too many inventories. In the case of --partial repositories or patch bundles, it is crucial that we don't need to read the whole history, since it isn't available. TODO: The length equalising isn't necessarily right. We probably also be thinking about not going past the end of a partial repository, or favour local repository stuff over remote repository stuff. Also, when comparing l1 to l2, we should really be comparing the newly discovered one to all the lasts in the other patch set that we've got so far. | ||||||||||
| gcau :: forall p. RepoPatch p => PatchSet p -> PatchSet p -> Either MissingPatch ([PatchInfo], RL (RL (PatchInfoAnd p)) :\/: RL (RL (PatchInfoAnd p))) | ||||||||||
gcau determines a list of common patches and patches unique to each of the two PatchSets. The list of common patches only needs to include all patches that are not interspersed with the unique patches, but including more patches in the list of common patches doesn't really hurt, except for efficiency considerations. Mostly, we want to access as few elements as possible of the PatchSet list, since those can be expensive (or unavailable). In other words, the common patches need not be minimal, whereas the PatchSets should be minimal for performance reasons. PatchSets have the property that if (info $ last $ head a) == (info $ last $ head b) then (tail a) and (tail b) are identical repositories, and we want to take advantage of this if possible, to avoid reading too many inventories. In the case of --partial repositories or patch bundles, it is crucial that we don't need to read the whole history, since it isn't available. TODO: The length equalising isn't necessarily right. We probably also be thinking about not going past the end of a partial repository, or favour local repository stuff over remote repo stuff. Also, when comparing l1 to l2, we should really be comparing the newly discovered one to all the lasts in the other patch set that we've got so far. | ||||||||||
| lastRL :: RL a -> Sealed a | ||||||||||
| dropWhileNilRL :: PatchSet p -> PatchSet p | ||||||||||
| gcau_simple | ||||||||||
| ||||||||||
| data MissingPatch | ||||||||||
| ||||||||||
| get_extra | ||||||||||
| ||||||||||
| missingPatchError :: MissingPatch -> a | ||||||||||
| get_extra_old :: RepoPatch p => [PatchInfo] -> RL (PatchInfoAnd p) -> FlippedSeal (RL (PatchInfoAnd p)) | ||||||||||
| get_patches_beyond_tag :: RepoPatch p => PatchInfo -> PatchSet p -> FlippedSeal (RL (RL (PatchInfoAnd p))) | ||||||||||
| get_patches_in_tag :: RepoPatch p => PatchInfo -> PatchSet p -> SealedPatchSet p | ||||||||||
| get_patches_in_tag t ps returns a SealedPatchSet of all patches in ps which are contained in t. | ||||||||||
| get_tags_right :: RL (RL (PatchInfoAnd p)) -> [PatchInfo] | ||||||||||
| deep_optimize_patchset :: PatchSet p -> PatchSet p | ||||||||||
| optimize_patchset :: PatchSet p -> PatchSet p | ||||||||||
| (-:-) :: PatchInfoAnd p -> RL (RL (PatchInfoAnd p)) -> RL (RL (PatchInfoAnd p)) | ||||||||||
| slightly_optimize_patchset :: PatchSet p -> PatchSet p | ||||||||||
| commute_to_end :: forall p. RepoPatch p => FL (Named p) -> PatchSet p -> FL (Named p) :< RL (RL (PatchInfoAnd p)) | ||||||||||
| patchset_intersection :: RepoPatch p => [SealedPatchSet p] -> SealedPatchSet p | ||||||||||
| patchset_union :: forall p. RepoPatch p => [SealedPatchSet p] -> SealedPatchSet p | ||||||||||
| merge_sets :: RepoPatch p => (RL (PatchInfoAnd p) :\/: RL (PatchInfoAnd p)) -> Sealed (RL (PatchInfoAnd p)) | ||||||||||
| Produced by Haddock version 2.4.2 | ||||||||||