License | GPL-2 |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
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)
- identifyRepository :: forall rt p wR wU wT. UseCache -> String -> IO (Repository rt p wR wU wT)
- 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)
- data IdentifyRepo rt p wR wU wT
- = BadRepository String
- | NonRepository String
- | GoodRepository (Repository rt p wR wU wT)
- findRepository :: WorkRepo -> IO (Either String ())
- amInRepository :: WorkRepo -> IO (Either String ())
- amNotInRepository :: WorkRepo -> IO (Either String ())
- amInHashedRepository :: WorkRepo -> IO (Either String ())
- seekRepo :: IO (Maybe (Either String ()))
- findAllReposInDir :: FilePath -> IO [FilePath]
Documentation
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