| darcs-2.4.3: a distributed, interactive, smart revision control system | Source code | Contents | Index
Darcs.Repository.Internal
Synopsis
data Repository p = Repo !String ![DarcsFlag] !RepoFormat !(RepoType p)
data RepoType p = DarcsRepository !Pristine Cache
data RIO p a
($-) :: ((forall p. RepoPatch p => Repository p -> IO a) -> IO a) -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a
maybeIdentifyRepository :: [DarcsFlag] -> String -> IO (Either String (Repository p))
identifyDarcs1Repository :: [DarcsFlag] -> String -> IO (Repository Patch)
identifyRepositoryFor :: forall p. RepoPatch p => Repository p -> String -> IO (Repository p)
findRepository :: [DarcsFlag] -> IO (Either String ())
amInRepository :: [DarcsFlag] -> IO (Either String ())
amNotInRepository :: [DarcsFlag] -> IO (Either String ())
slurp_pending :: RepoPatch p => Repository p -> IO Slurpy
revertRepositoryChanges :: RepoPatch p => Repository p -> IO ()
slurp_recorded :: RepoPatch p => Repository p -> IO Slurpy
slurp_recorded_and_unrecorded :: RepoPatch p => Repository p -> IO (Slurpy, Slurpy)
announce_merge_conflicts :: String -> [DarcsFlag] -> FL Prim -> IO Bool
setTentativePending :: forall p. RepoPatch p => Repository p -> FL Prim -> IO ()
check_unrecorded_conflicts :: forall p. RepoPatch p => [DarcsFlag] -> FL (Named p) -> IO Bool
withRecorded :: RepoPatch p => Repository p -> ((AbsolutePath -> IO a) -> IO a) -> (AbsolutePath -> IO a) -> IO a
read_repo :: RepoPatch p => Repository p -> IO (PatchSet p)
prefsUrl :: Repository p -> String
makePatchLazy :: RepoPatch p => Repository p -> PatchInfoAnd p -> IO (PatchInfoAnd p)
withRepoLock :: [DarcsFlag] -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a
withRepoReadLock :: [DarcsFlag] -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a
withRepository :: [DarcsFlag] -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a
withRepositoryDirectory :: forall a. [DarcsFlag] -> String -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a
withGutsOf :: Repository p -> IO () -> IO ()
tentativelyAddPatch :: RepoPatch p => Repository p -> [DarcsFlag] -> PatchInfoAnd p -> IO ()
tentativelyRemovePatches :: RepoPatch p => Repository p -> [DarcsFlag] -> FL (Named p) -> IO ()
tentativelyAddToPending :: forall p. RepoPatch p => Repository p -> [DarcsFlag] -> FL Prim -> IO ()
tentativelyAddPatch_ :: RepoPatch p => UpdatePristine -> Repository p -> [DarcsFlag] -> PatchInfoAnd p -> IO ()
tentativelyReplacePatches :: forall p. RepoPatch p => Repository p -> [DarcsFlag] -> FL (Named p) -> IO ()
finalizeRepositoryChanges :: RepoPatch p => Repository p -> IO ()
unrevertUrl :: Repository p -> String
applyToWorking :: Patchy p => Repository p1 -> [DarcsFlag] -> p -> IO ()
patchSetToPatches :: RepoPatch p => RL (RL (PatchInfoAnd p)) -> FL (Named p)
createPristineDirectoryTree :: RepoPatch p => Repository p -> FilePath -> IO ()
createPartialsPristineDirectoryTree :: (FilePathLike fp, RepoPatch p) => Repository p -> [fp] -> FilePath -> IO ()
optimizeInventory :: RepoPatch p => Repository p -> IO ()
cleanRepository :: RepoPatch p => Repository p -> IO ()
getMarkedupFile :: RepoPatch p => Repository p -> PatchInfo -> FilePath -> IO MarkedUpFile
type PatchSet p = RL (RL (PatchInfoAnd p))
type SealedPatchSet p = Sealed (RL (RL (PatchInfoAnd p)))
setScriptsExecutable :: IO ()
getRepository :: RIO p (Repository p)
rIO :: IO a -> RIO p a
testTentative :: RepoPatch p => Repository p -> IO ()
testRecorded :: RepoPatch p => Repository p -> IO ()
data UpdatePristine
= UpdatePristine
| DontUpdatePristine
data MakeChanges
= MakeChanges
| DontMakeChanges
applyToTentativePristine :: (Effect q, Patchy q) => Repository p -> q -> IO ()
make_new_pending :: forall p. RepoPatch p => Repository p -> FL Prim -> IO ()
Documentation
data Repository p | Source
Constructors
Repo !String ![DarcsFlag] !RepoFormat !(RepoType p) |
Instances
Show (Repository p)
data RepoType p | Source
Constructors
DarcsRepository !Pristine Cache |
Instances
Show (RepoType p)
data RIO p a | Source
Repository IO monad. This monad-like datatype is responsible for sequencing IO actions that modify the tentative recorded state of the repository.
Instances
Monad (RIO p)
Functor (RIO p)
($-) :: ((forall p. RepoPatch p => Repository p -> IO a) -> IO a) -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a | Source
maybeIdentifyRepository :: [DarcsFlag] -> String -> IO (Either String (Repository p)) | Source
identifyDarcs1Repository :: [DarcsFlag] -> String -> IO (Repository Patch) | Source
identifyRepositoryFor :: forall p. RepoPatch p => Repository p -> String -> IO (Repository p) | Source
findRepository :: [DarcsFlag] -> IO (Either String ()) | Source
amInRepository :: [DarcsFlag] -> IO (Either String ()) | Source
amNotInRepository :: [DarcsFlag] -> IO (Either String ()) | Source
slurp_pending :: RepoPatch p => Repository p -> IO Slurpy | Source
revertRepositoryChanges :: RepoPatch p => Repository p -> IO () | Source
slurp_recorded :: RepoPatch p => Repository p -> IO Slurpy | Source
slurp_recorded_and_unrecorded :: RepoPatch p => Repository p -> IO (Slurpy, Slurpy) | Source
announce_merge_conflicts :: String -> [DarcsFlag] -> FL Prim -> IO Bool | Source
setTentativePending :: forall p. RepoPatch p => Repository p -> FL Prim -> IO () | Source
setTentativePending is basically unsafe. It overwrites the pending state with a new one, not related to the repository state.
check_unrecorded_conflicts :: forall p. RepoPatch p => [DarcsFlag] -> FL (Named p) -> IO Bool | Source
withRecorded :: RepoPatch p => Repository p -> ((AbsolutePath -> IO a) -> IO a) -> (AbsolutePath -> IO a) -> IO a | Source
read_repo :: RepoPatch p => Repository p -> IO (PatchSet p) | Source
prefsUrl :: Repository p -> String | Source
makePatchLazy :: RepoPatch p => Repository p -> PatchInfoAnd p -> IO (PatchInfoAnd p) | Source
withRepoLock :: [DarcsFlag] -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a | Source
withRepoReadLock :: [DarcsFlag] -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a | Source
withRepository :: [DarcsFlag] -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a | Source
withRepositoryDirectory :: forall a. [DarcsFlag] -> String -> (forall p. RepoPatch p => Repository p -> IO a) -> IO a | Source
withGutsOf :: Repository p -> IO () -> IO () | Source
tentativelyAddPatch :: RepoPatch p => Repository p -> [DarcsFlag] -> PatchInfoAnd p -> IO () | Source
tentativelyRemovePatches :: RepoPatch p => Repository p -> [DarcsFlag] -> FL (Named p) -> IO () | Source
tentativelyAddToPending :: forall p. RepoPatch p => Repository p -> [DarcsFlag] -> FL Prim -> IO () | Source
This fuction is unsafe because it accepts a patch that works on the tentative pending and we don't currently track the state of the tentative pending.
tentativelyAddPatch_ :: RepoPatch p => UpdatePristine -> Repository p -> [DarcsFlag] -> PatchInfoAnd p -> IO () | Source
tentativelyReplacePatches :: forall p. RepoPatch p => Repository p -> [DarcsFlag] -> FL (Named p) -> IO () | Source
finalizeRepositoryChanges :: RepoPatch p => Repository p -> IO () | Source
unrevertUrl :: Repository p -> String | Source
applyToWorking :: Patchy p => Repository p1 -> [DarcsFlag] -> p -> IO () | Source
patchSetToPatches :: RepoPatch p => RL (RL (PatchInfoAnd p)) -> FL (Named p) | Source
createPristineDirectoryTree :: RepoPatch p => Repository p -> FilePath -> IO () | Source
createPartialsPristineDirectoryTree :: (FilePathLike fp, RepoPatch p) => Repository p -> [fp] -> FilePath -> IO () | Source
optimizeInventory :: RepoPatch p => Repository p -> IO () | Source
Writes out a fresh copy of the inventory that minimizes the amount of inventory that need be downloaded when people pull from the repository. Specifically, it breaks up the inventory on the most recent tag. This speeds up most commands when run remotely, both because a smaller file needs to be transfered (only the most recent inventory). It also gives a guarantee that all the patches prior to a given tag are included in that tag, so less commutation and history traversal is needed. This latter issue can become very important in large repositories.
cleanRepository :: RepoPatch p => Repository p -> IO () | Source
getMarkedupFile :: RepoPatch p => Repository p -> PatchInfo -> FilePath -> IO MarkedUpFile | Source
type PatchSet p = RL (RL (PatchInfoAnd p)) | Source
A PatchSet is in reverse order, plus has information about which tags are clean, meaning all patches applied prior to them are in the tag itself, so we can stop reading at that point. Just to clarify, the first patch in a PatchSet is the one most recently applied to the repo. `PatchSet`s have the property that if `(info $ last $ head a) == (info $ last $ head b)` then `(tail a)` and `(tail b)` are identical repositories Questions: Does this mean that in a patch set such as `[[a b t1 c d e t2][f g t3] [h i]]`, t1, t2 and t3 are tags, and t2 and t3 are clean? Can we have PatchSet with length at least 3? Florent
type SealedPatchSet p = Sealed (RL (RL (PatchInfoAnd p))) | Source
setScriptsExecutable :: IO () | Source
Sets scripts in or below the current directory executable. A script is any file that starts with the bytes '#!'. This is used sometimes for --set-scripts-executable, but at other times --set-scripts-executable is handled by the hunk patch case of applyFL.
getRepository :: RIO p (Repository p) | Source
Similar to the `ask` function of the MonadReader class. This allows actions in the RIO monad to get the current repository. FIXME: Don't export this. If we don't export this it makes it harder for arbitrary IO actions to access the repository and hence our code is easier to audit.
rIO :: IO a -> RIO p a | Source
This the `RIO` equivalent of `liftIO`.
testTentative :: RepoPatch p => Repository p -> IO () | Source
testRecorded :: RepoPatch p => Repository p -> IO () | Source
data UpdatePristine | Source
Constructors
UpdatePristine |
DontUpdatePristine |
Instances
Eq UpdatePristine
data MakeChanges | Source
Constructors
MakeChanges |
DontMakeChanges |
Instances
Eq MakeChanges
applyToTentativePristine :: (Effect q, Patchy q) => Repository p -> q -> IO () | Source
make_new_pending :: forall p. RepoPatch p => Repository p -> FL Prim -> IO () | Source
Produced by Haddock version 2.4.2