HsSVN-0.1: (Part of) Subversion binding for HaskellContentsIndex
Subversion.FileSystem.Revision
Contents
Type
Running the monad
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
getRevisionProp :: FileSystem -> RevNum -> String -> IO (Maybe 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 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 the monad if you wish.

show/hide Instances
Functor Rev
Monad Rev
MonadFS Rev
Running the monad
withRevision :: FileSystem -> RevNum -> Rev a -> IO a
withRevision runs a Rev monad in an IO monad.
Accessing revision property
getRevisionProp :: FileSystem -> RevNum -> String -> IO (Maybe String)
getRevisionProp fs revNum propName returns the value of the property named propName on revision revNum in the filesystem fs.
getRevisionPropList :: FileSystem -> RevNum -> IO [(String, String)]
getRevisionPropList fs revNum returns the entire property list of revision revNum in filesystem fs.
setRevisionProp
:: FileSystemThe transaction
-> RevNumThe revision
-> StringThe property name
-> Maybe StringThe property value
-> IO ()
setRevisionProp changes, adds or deletes 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 this is 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.

The revisions returned for a path will be older than or the same age as the revision of that path in the target revision of Rev monad. That is, if the Rev monad is running on revision X, and the path was modified in some revisions younger than X, those revisions younger than X will not be included for the path.

Produced by Haddock version 0.8