| darcs | Source code | Contents | Index

Darcs.Repository.Format

Synopsis

newtype RepoFormat = RF [[ByteString]]

data RepoProperty

= Darcs1_0
| Darcs2
| HashedInventory

identifyRepoFormat :: String -> IO (Either String RepoFormat)
createRepoFormat :: [DarcsFlag] -> RepoFormat
writeRepoFormat :: RepoFormat -> FilePath -> IO ()
writeProblem :: RepoFormat -> Maybe String
readProblem :: RepoFormat -> Maybe String
readfromAndWritetoProblem :: RepoFormat -> RepoFormat -> Maybe String
formatHas :: RepoProperty -> RepoFormat -> Bool
formatHasTogether :: [RepoProperty] -> RepoFormat -> Bool

Documentation

newtype RepoFormat | Source

`RepoFormat` is the representation of the format of a repository. Each sublist corresponds to a line in the format file. Each line is decomposed into words.
Constructors

RF [[ByteString]] |

Instances

Show RepoFormat

data RepoProperty | Source

Constructors

Darcs1_0 |
Darcs2 |
HashedInventory |

identifyRepoFormat :: String -> IO (Either String RepoFormat) | Source

`identifyRepoFormat URL` identifies the format of the repository at the given address. Return `Left reason` if it fails, where `reason` explains why we weren't able to identify the format.

createRepoFormat :: [DarcsFlag] -> RepoFormat | Source

writeRepoFormat :: RepoFormat -> FilePath -> IO () | Source

`writeRepoFormat` writes the repo format to the given file.

writeProblem :: RepoFormat -> Maybe String | Source

`writeProblem from` tells if we can write to a repo in format `form`. it returns `Nothing` if there's no problem writing to such a repository.

readProblem :: RepoFormat -> Maybe String | Source

`readProblem from` tells if we can write to a repo in format `form`. it returns `Nothing` if there's no problem reading from such a repository.

readfromAndWritetoProblem :: RepoFormat -> RepoFormat -> Maybe String | Source

`writeProblem from` tells if we can read and write to a repo in format `form`. it returns `Nothing` if there's no problem reading and writing to such a repository.

formatHas :: RepoProperty -> RepoFormat -> Bool | Source

formatHasTogether :: [RepoProperty] -> RepoFormat -> Bool | Source

Produced by Haddock version 2.4.2