filestore-0.1: Interface for versioning file stores.Source codeContentsIndex
PortabilityGHC 6.10 required
MaintainerJohn MacFarlane <>
Generic utility functions for working with filestores.
modify :: Contents a => FileStore -> ResourceName -> RevisionId -> Author -> Description -> a -> IO (Either MergeInfo ())
create :: Contents a => FileStore -> ResourceName -> Author -> Description -> a -> IO ()
data DI
= F
| S
| B
diff :: FileStore -> ResourceName -> Maybe RevisionId -> Maybe RevisionId -> IO [(DI, [String])]
searchRevisions :: FileStore -> Bool -> ResourceName -> Description -> IO [Revision]
smartRetrieve :: Contents a => FileStore -> Bool -> ResourceName -> Maybe String -> IO a
:: Contents a
=> FileStoreResource to create.
-> ResourceNameID of previous revision that is being modified.
-> RevisionIdAuthor of change.
-> AuthorDescription of change.
-> DescriptionContents of resource.
-> a
-> IO (Either MergeInfo ())
Modify a named resource in the filestore. Like save, except that a revision ID must be specified. If the resource has been modified since the specified revision, Left merge information is returned. Otherwise, Right the new contents are saved.
:: Contents a
=> FileStoreResource to create.
-> ResourceNameAuthor of change.
-> AuthorDescription of change.
-> DescriptionContents of resource.
-> a
-> IO ()
Like save, but first verify that the resource name is new. If not, throws a ResourceExists error.
data DI Source
Difference Indicator. A value is either from the First list, the Second or from Both.
show/hide Instances
:: FileStore
-> ResourceNameResource name to get diff for.
-> Maybe RevisionIdJust old revision ID, or Nothing for empty.
-> Maybe RevisionIdJust oew revision ID, or Nothing for latest.
-> IO [(DI, [String])]
Return a unified diff of two revisions of a named resource, using an external diff program.
:: FileStore
-> BoolWhen true the description must match exactly, when false partial hits are allowed.
-> ResourceNameThe resource to search history for.
-> DescriptionRevision description to search for.
-> IO [Revision]
Return a list of all revisions that are saved with the given description or with a part of this description.
:: Contents a
=> FileStoreTrue for exact description match, False for partial match.
-> BoolResource name to retrieve.
-> ResourceNameJust revision ID or description, or Nothing for empty.
-> Maybe String
-> IO a
Try to retrieve a resource from the repository by name and possibly a revision identifier. When retrieving a resource by revision identifier fails this function will try to fetch the latest revision for which the description matches the given string.
Produced by Haddock version 2.6.0