HsSVN-0.4.3.1: Partial Subversion (SVN) binding for HaskellContentsIndex
Subversion.FileSystem.Revision
Contents
Type
Running the monad
Getting revision info
Accessing revision property
Getting node history
Description
An interface to functions that work on an existing (i.e. read-only) revision in a filesystem.
Synopsis
data Rev a
withRevision :: FileSystem -> RevNum -> Rev a -> IO a
getRevisionNumber :: Rev RevNum
getRevisionProp :: String -> Rev (Maybe String)
getRevisionProp' :: FileSystem -> RevNum -> String -> IO (Maybe String)
getRevisionPropList :: Rev [(String, String)]
getRevisionPropList' :: FileSystem -> RevNum -> IO [(String, String)]
setRevisionProp :: FileSystem -> RevNum -> String -> Maybe String -> IO ()
getNodeHistory :: Bool -> FilePath -> Rev [(RevNum, FilePath)]
Type
data Rev a

Rev a is a FS monad which reads some data from an existing revision and finally returns a. See MonadFS.

Since Rev monad does no transactions, unsafeIOToFS isn't really unsafe. You can do any I/O actions in a monadic computation if you wish.

show/hide Instances
Running the monad
withRevision :: FileSystem -> RevNum -> Rev a -> IO a
withRevision runs a Rev monad in an IO monad.
Getting revision info
getRevisionNumber :: Rev RevNum
Return the revision number.
Accessing revision property
getRevisionProp :: String -> Rev (Maybe String)
getRevisionProp propName returns the value of the property named propName of the revision.
getRevisionProp' :: FileSystem -> RevNum -> String -> IO (Maybe String)
getRevisionProp' fs revNum propName returns the value of the property named propName of revision revNum of filesystem fs.
getRevisionPropList :: Rev [(String, String)]
Return the entire property list of the revision.
getRevisionPropList' :: FileSystem -> RevNum -> IO [(String, String)]
Return the entire property list of the given revision.
setRevisionProp
:: FileSystemThe filesystem
-> RevNumThe revision
-> StringThe property name
-> Maybe StringThe property value
-> IO ()
Change, add or delete a property on a revision. Note that revision properties are non-historied: you can change them after the revision has been comitted. They are not protected via transactions.
Getting node history
getNodeHistory
:: BoolIf True, stepping backwards in history would cross a copy operation. This is usually the desired behavior.
-> FilePathThe path to node you want to read history.
-> Rev [(RevNum, FilePath)]A list of (revNum, nodePath): the node was modified somehow at revision revNum, and at that time the node was located on nodePath.

getNodeHistory lazily reads the change history of given node in a filesystem. The most recent change comes first in the resulting list.

Revisions in the resulting list will be older than or the same age as the revision of that node in the target revision of Rev monad. That is, if the Rev monad is running on revision X, and the node has been modified in some revisions younger than X, those revisions younger than X will not be included in the list.

Produced by Haddock version 2.6.0