| Safe Haskell | Safe-Infered |
|---|
Darcs.UI.SelectChanges
- selectChanges :: forall p wX wY. (Patchy p, ApplyState p ~ Tree) => WhichChanges -> FL p wX wY -> PatchSelection p wX wY
- data WhichChanges
- = Last
- | LastReversed
- | First
- | FirstReversed
- viewChanges :: (Patchy p, ApplyState p ~ Tree) => [DarcsFlag] -> [Sealed2 p] -> IO ()
- withSelectedPatchFromRepo :: forall p wR wU wT. (RepoPatch p, ApplyState p ~ Tree) => String -> Repository p wR wU wT -> [DarcsFlag] -> (forall wA. (FL (PatchInfoAnd p) :> PatchInfoAnd p) wA wR -> IO ()) -> IO ()
- filterOutConflicts :: (RepoPatch p, ApplyState p ~ Tree) => [DarcsFlag] -> RL (PatchInfoAnd p) wX wT -> Repository p wR wU wT -> FL (PatchInfoAnd p) wX wZ -> IO (Bool, Sealed (FL (PatchInfoAnd p) wX))
- runSelection :: Patchy p => PatchSelection p wX wY -> PatchSelectionContext p -> IO ((FL p :> FL p) wX wY)
- selectionContextPrim :: PrimPatch prim => String -> [DarcsFlag] -> Maybe (Splitter prim) -> Maybe [FilePath] -> Maybe (Tree IO) -> PatchSelectionContext prim
- selectionContext :: RepoPatch p => String -> [DarcsFlag] -> Maybe (Splitter (PatchInfoAnd p)) -> Maybe [FilePath] -> PatchSelectionContext (PatchInfoAnd p)
Documentation
selectChanges :: forall p wX wY. (Patchy p, ApplyState p ~ Tree) => WhichChanges -> FL p wX wY -> PatchSelection p wX wY
Select patches from a FL.
data WhichChanges
When asking about patches, we either ask about them in oldest-first or newest first (with respect to the current ordering of the repository), and we either want an initial segment or a final segment of the poset of patches.
First: ask for an initial
segment, first patches first (default for all pull-like commands)
FirstReversed: ask for an initial segment, last patches first
(used to ask about dependencies in record, and for pull-like
commands with the --reverse flag).
LastReversed: ask for a final segment, last patches first. (default
for unpull-like commands, except for selecting *primitive* patches in
rollback)
Last: ask for a final segment, first patches first. (used for selecting
primitive patches in rollback, and for unpull-like commands with the
--reverse flag
Constructors
| Last | |
| LastReversed | |
| First | |
| FirstReversed |
Instances
| Eq WhichChanges | |
| Show WhichChanges |
viewChanges :: (Patchy p, ApplyState p ~ Tree) => [DarcsFlag] -> [Sealed2 p] -> IO ()
The equivalent of selectChanges for the darcs changes command
withSelectedPatchFromRepo :: forall p wR wU wT. (RepoPatch p, ApplyState p ~ Tree) => String -> Repository p wR wU wT -> [DarcsFlag] -> (forall wA. (FL (PatchInfoAnd p) :> PatchInfoAnd p) wA wR -> IO ()) -> IO ()
The function for selecting a patch to amend record. Read at your own risks.
Arguments
| :: (RepoPatch p, ApplyState p ~ Tree) | |
| => [DarcsFlag] | Command-line options. Only |
| -> RL (PatchInfoAnd p) wX wT | Recorded patches from repository, starting from same context as the patches to filter |
| -> Repository p wR wU wT | Repository itself, used for grabbing unrecorded changes |
| -> FL (PatchInfoAnd p) wX wZ | Patches to filter |
| -> IO (Bool, Sealed (FL (PatchInfoAnd p) wX)) | (True iff any patches were removed, possibly filtered patches) |
Optionally remove any patches (+dependencies) from a sequence that conflict with the recorded or unrecorded changes in a repo
runSelection :: Patchy p => PatchSelection p wX wY -> PatchSelectionContext p -> IO ((FL p :> FL p) wX wY)
runs a PatchSelection action in the given PatchSelectionContext.
selectionContextPrim :: PrimPatch prim => String -> [DarcsFlag] -> Maybe (Splitter prim) -> Maybe [FilePath] -> Maybe (Tree IO) -> PatchSelectionContext prim
A PatchSelectionContext for selecting Prim patches.
selectionContext :: RepoPatch p => String -> [DarcsFlag] -> Maybe (Splitter (PatchInfoAnd p)) -> Maybe [FilePath] -> PatchSelectionContext (PatchInfoAnd p)
A PatchSelectionContext for selecting full patches (PatchInfoAnd patches)