darcs-2.1.98.2: a distributed, interactive, smart revision control systemSource codeContentsIndex
Darcs.Patch.Choices
Description

PatchChoices divides a sequence of patches into three sets: first, middle and last, such that all patches can be applied, if you first apply the first ones then the middle ones and then the last ones. Obviously if there are dependencies between the patches that will put a constraint on how you can choose to divide them up. The PatchChoices data type and associated functions are here to deal with many of the common cases that come up when choosing a subset of a group of patches.

force_last tells PatchChoices that a particular patch is required to be in the last group, which also means that any patches that depend on it must be in the last group.

Internally, a PatchChoices doesn't actually reorder the patches until it is asked for the final output (e.g. by get_first_choice). Instead, each patch is placed in a state of definitely first, definitely last and undecided; undecided leans towards middle. In case you're wondering about the first-middle-last language, it's because in some cases the yes answers will be last (as is the case for the revert command), and in others first (as in record, pull and push).

Documentation
data PatchChoices p Source
patch_choices :: Patchy p => FL p -> PatchChoices pSource
patch_choices_tps :: Patchy p => FL p -> (PatchChoices p, FL (TaggedPatch p))Source
patch_slot :: forall p. TaggedPatch p -> PatchChoices p -> SlotSource
get_choices :: Patchy p => PatchChoices p -> FL (TaggedPatch p) :> (FL (TaggedPatch p) :> FL (TaggedPatch p))Source
separate_first_middle_from_last :: Patchy p => PatchChoices p -> FL (TaggedPatch p) :> FL (TaggedPatch p)Source
separate_first_from_middle_last :: Patchy p => PatchChoices p -> FL (TaggedPatch p) :> FL (TaggedPatch p)Source
force_first :: Patchy p => Tag -> PatchChoices p -> PatchChoices pSource
force_firsts :: Patchy p => [Tag] -> PatchChoices p -> PatchChoices pSource
force_last :: Patchy p => Tag -> PatchChoices p -> PatchChoices pSource
force_lasts :: Patchy p => [Tag] -> PatchChoices p -> PatchChoices pSource
force_matching_first :: Patchy p => (TaggedPatch p -> Bool) -> PatchChoices p -> PatchChoices pSource
force_matching_last :: Patchy p => (TaggedPatch p -> Bool) -> PatchChoices p -> PatchChoices pSource
select_all_middles :: Patchy p => Bool -> PatchChoices p -> PatchChoices pSource
make_uncertain :: Patchy p => Tag -> PatchChoices p -> PatchChoices pSource
make_everything_later :: Patchy p => PatchChoices p -> PatchChoices pSource
data TaggedPatch p Source
show/hide Instances
data Tag Source
show/hide Instances
tag :: TaggedPatch p -> TagSource
tp_patch :: TaggedPatch p -> pSource
data Slot Source
Constructors
InFirst
InMiddle
InLast
Produced by Haddock version 2.4.2