darcs-2.14.3: a distributed, interactive, smart revision control system

Safe HaskellNone



A set of functions to identify and find Darcs repositories from a given URL or a given filesystem path.



maybeIdentifyRepository :: UseCache -> String -> IO (IdentifyRepo rt p wR wU wT) Source #

Tries to identify the repository in a given directory

identifyRepository :: forall rt p wR wU wT. UseCache -> String -> IO (Repository rt p wR wU wT) Source #

identifyRepository identifies the repo at url. Warning: you have to know what kind of patches are found in that repo.

identifyRepositoryFor :: forall rt p wR wU wT vR vU vT. Repository rt p wR wU wT -> UseCache -> String -> IO (Repository rt p vR vU vT) Source #

identifyRepositoryFor repo url identifies (and returns) the repo at url, but fails if it is not compatible for reading from and writing to.

data IdentifyRepo rt p wR wU wT Source #

The status of a given directory: is it a darcs repository?


BadRepository String

looks like a repository with some error

NonRepository String

safest guess

GoodRepository (Repository rt p wR wU wT) 

seekRepo :: IO (Maybe (Either String ())) Source #

hunt upwards for the darcs repository This keeps changing up one parent directory, testing at each step if the current directory is a repository or not. $ The result is: Nothing, if no repository found Just (Left errorMessage), if bad repository found Just (Right ()), if good repository found. WARNING this changes the current directory for good if matchFn succeeds

findAllReposInDir :: FilePath -> IO [FilePath] Source #

findAllReposInDir topDir returns all paths to repositories under topDir.