-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Wrapper for source code management systems
--   
--   Provides simple haskell functions to call external source code
--   management systems. Currently git and SVN are supported.
@package vcswrapper
@version 0.1.6


-- | This module exports types and functions common to all VCS.
module VCSWrapper.Common

-- | Available VCS types implemented in this package.
data VCSType
SVN :: VCSType
GIT :: VCSType
Mercurial :: VCSType

-- | <a>True</a>, if this file is locked by the VCS.
type IsLocked = Bool

-- | Represents a log entry in the history managed by the VCS.
data LogEntry
LogEntry :: Maybe Text -> Text -> Text -> Text -> Text -> Text -> Text -> LogEntry

-- | Maybe Branchname
[mbBranch] :: LogEntry -> Maybe Text

-- | Commit identifier
[commitID] :: LogEntry -> Text

-- | Author of this commit.
[author] :: LogEntry -> Text

-- | Email address of the author.
[email] :: LogEntry -> Text

-- | Date this log entry was created.
[date] :: LogEntry -> Text

-- | Short commit message.
[subject] :: LogEntry -> Text

-- | Long body of the commit message.
[body] :: LogEntry -> Text

-- | Context for all VCS commands.
--   
--   E.g. to create a new Git repository use something like this:
--   
--   <pre>
--   import VCSWrapper.Git
--   myInitRepoFn = do
--       let config = makeConfig "path/to/repo" Nothing Nothing
--       runVcs config $ initDB False
--   </pre>
newtype Ctx a
Ctx :: (ReaderT Config IO a) -> Ctx a

-- | Configuration of the <a>Ctx</a> the VCS commands will be executed in.
data Config
Config :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> [(Text, Text)] -> Config

-- | Path to the main directory of the repository. E.g. for Git: the
--   directory of the repository containing the <tt>.git</tt> config
--   directory.
[configCwd] :: Config -> Maybe FilePath

-- | Path to the vcs executable. If <a>Nothing</a>, the PATH environment
--   variable will be search for a matching executable.
[configPath] :: Config -> Maybe FilePath

-- | Author to be used for different VCS actions. If <a>Nothing</a>, the
--   default for the selected repository will be used.
[configAuthor] :: Config -> Maybe Author

-- | List of environment variables mappings passed to the underlying VCS
--   executable.
[configEnvironment] :: Config -> [(Text, Text)]

-- | Author to be passed to VCS commands where applicable.
data Author
Author :: Text -> Maybe Text -> Author

-- | Name of the author.
[authorName] :: Author -> Text

-- | Email address of the author.
[authorEmail] :: Author -> Maybe Text

-- | This <a>Exception</a>-type will be thrown if a VCS command fails
--   unexpectedly.
data VCSException

-- | Exit code -&gt; stdout -&gt; errout -&gt; <a>configCwd</a> of the
--   <a>Config</a> -&gt; List containing the executed command and its
--   options
VCSException :: Int -> Text -> Text -> FilePath -> [Text] -> VCSException

-- | Status of a file managed by the respective VCS.
data Status
SVNStatus :: FilePath -> Modification -> IsLocked -> Status
GITStatus :: FilePath -> Modification -> Status

-- | Flags to describe the state of a file.
data Modification

-- | File hasn't been modified.
None :: Modification

-- | File has been selected to be managed by the respective VCS.
Added :: Modification

-- | File is in conflicting state. Manually resolving the conflict may be
--   necessary.
Conflicting :: Modification

-- | File has been deleted.
Deleted :: Modification

-- | File has been modified since last commit.
Modified :: Modification

-- | File has been replaced by a different file.
Replaced :: Modification

-- | File is currently not known by the VCS.
Untracked :: Modification

-- | State of file is unknown.
Unknown :: Modification

-- | File is ignored by VCS.
Ignored :: Modification

-- | File is missing.
Missing :: Modification

-- | Creates a new <a>Config</a>.
makeConfig :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> Config

-- | Creates a new <a>Config</a> with a list of environment variables.
makeConfigWithEnvironment :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> [(Text, Text)] -> Config

-- | Retrieve the <a>FilePath</a> of any VCS <a>Status</a>.
filePath :: Status -> FilePath

-- | Retrieve the <a>Modification</a> of any VCS <a>Status</a>.
modification :: Status -> Modification

-- | Retrieve the <a>IsLocked</a> of any VCS <a>Status</a>. For Git, this
--   returns always <a>False</a>.
isLocked :: Status -> IsLocked

-- | Run a VCS <a>Ctx</a> from a <a>Config</a> and returns the result
runVcs :: Config -> Ctx t -> IO t

-- | Internal function to execute a VCS command
vcsExec :: FilePath -> Text -> [Text] -> [(Text, Text)] -> Ctx (Either VCSException Text)

-- | Internal function to execute a VCS command. Throws an exception if the
--   command fails.
vcsExecThrowingOnError :: FilePath -> Text -> [Text] -> [(Text, Text)] -> Ctx Text

-- | Internal function to execute a VCS command
exec :: Text -> [Text] -> [(Text, Text)] -> FilePath -> (Config -> Maybe FilePath) -> Ctx (Either VCSException Text)


module VCSWrapper.Git.Safe

-- | Initialize a new git repository. Executes <tt>git init</tt>.
initDB :: Bool -> Ctx (Either VCSException ())

-- | Add files to the index. Executes <tt>git add</tt>.
add :: [FilePath] -> Ctx (Either VCSException ())

-- | Remove files from the index and the working directory. Executes
--   <tt>git rm</tt>.
rm :: [FilePath] -> Ctx (Either VCSException ())

-- | Commit the current index or the specified files to the repository.
--   Executes <tt>git commit</tt>.
commit :: [FilePath] -> Maybe (Text, Text) -> Text -> [Text] -> Ctx (Either VCSException ())

-- | Checkout the index to some commit ID. Executes <tt>git checkout</tt>.
checkout :: Maybe Text -> Maybe Text -> Ctx (Either VCSException ())

-- | Return status of the repository as a list of <a>Status</a>. Executes
--   <tt>git status</tt>.
status :: Ctx (Either VCSException [Status])

-- | Get all commit messages. Executes <tt>git log</tt>.
simpleLog :: Maybe Text -> Ctx (Either VCSException [LogEntry])

-- | Get all local branches. Executes <tt>git branch</tt>.
localBranches :: Ctx (Either VCSException (Text, [Text]))

-- | Rev-parse a revision. Executes <tt>git rev-parse</tt>.
revparse :: Text -> Ctx (Either VCSException Text)

-- | Get all remotes. Executes <tt>git remote</tt>.
remote :: Ctx (Either VCSException [Text])

-- | Pull changes from the remote as configured in the git configuration.
--   If a merge conflict is detected, the error message is returned,
--   otherwise 'Right ()' is returned. Executes <tt>git pull</tt>.
pull :: Ctx (Either VCSException (Maybe Text))

-- | Push changes to the remote as configured in the git configuration.
--   Executes <tt>git push</tt>.
push :: Ctx (Either VCSException ())

-- | Run a VCS <a>Ctx</a> from a <a>Config</a> and returns the result
runVcs :: Config -> Ctx t -> IO t

-- | Available VCS types implemented in this package.
data VCSType
SVN :: VCSType
GIT :: VCSType
Mercurial :: VCSType

-- | <a>True</a>, if this file is locked by the VCS.
type IsLocked = Bool

-- | Represents a log entry in the history managed by the VCS.
data LogEntry
LogEntry :: Maybe Text -> Text -> Text -> Text -> Text -> Text -> Text -> LogEntry

-- | Maybe Branchname
[mbBranch] :: LogEntry -> Maybe Text

-- | Commit identifier
[commitID] :: LogEntry -> Text

-- | Author of this commit.
[author] :: LogEntry -> Text

-- | Email address of the author.
[email] :: LogEntry -> Text

-- | Date this log entry was created.
[date] :: LogEntry -> Text

-- | Short commit message.
[subject] :: LogEntry -> Text

-- | Long body of the commit message.
[body] :: LogEntry -> Text

-- | Context for all VCS commands.
--   
--   E.g. to create a new Git repository use something like this:
--   
--   <pre>
--   import VCSWrapper.Git
--   myInitRepoFn = do
--       let config = makeConfig "path/to/repo" Nothing Nothing
--       runVcs config $ initDB False
--   </pre>
newtype Ctx a
Ctx :: (ReaderT Config IO a) -> Ctx a

-- | Configuration of the <a>Ctx</a> the VCS commands will be executed in.
data Config
Config :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> [(Text, Text)] -> Config

-- | Path to the main directory of the repository. E.g. for Git: the
--   directory of the repository containing the <tt>.git</tt> config
--   directory.
[configCwd] :: Config -> Maybe FilePath

-- | Path to the vcs executable. If <a>Nothing</a>, the PATH environment
--   variable will be search for a matching executable.
[configPath] :: Config -> Maybe FilePath

-- | Author to be used for different VCS actions. If <a>Nothing</a>, the
--   default for the selected repository will be used.
[configAuthor] :: Config -> Maybe Author

-- | List of environment variables mappings passed to the underlying VCS
--   executable.
[configEnvironment] :: Config -> [(Text, Text)]

-- | Author to be passed to VCS commands where applicable.
data Author
Author :: Text -> Maybe Text -> Author

-- | Name of the author.
[authorName] :: Author -> Text

-- | Email address of the author.
[authorEmail] :: Author -> Maybe Text

-- | This <a>Exception</a>-type will be thrown if a VCS command fails
--   unexpectedly.
data VCSException

-- | Exit code -&gt; stdout -&gt; errout -&gt; <a>configCwd</a> of the
--   <a>Config</a> -&gt; List containing the executed command and its
--   options
VCSException :: Int -> Text -> Text -> FilePath -> [Text] -> VCSException

-- | Status of a file managed by the respective VCS.
data Status
SVNStatus :: FilePath -> Modification -> IsLocked -> Status
GITStatus :: FilePath -> Modification -> Status

-- | Flags to describe the state of a file.
data Modification

-- | File hasn't been modified.
None :: Modification

-- | File has been selected to be managed by the respective VCS.
Added :: Modification

-- | File is in conflicting state. Manually resolving the conflict may be
--   necessary.
Conflicting :: Modification

-- | File has been deleted.
Deleted :: Modification

-- | File has been modified since last commit.
Modified :: Modification

-- | File has been replaced by a different file.
Replaced :: Modification

-- | File is currently not known by the VCS.
Untracked :: Modification

-- | State of file is unknown.
Unknown :: Modification

-- | File is ignored by VCS.
Ignored :: Modification

-- | File is missing.
Missing :: Modification

-- | Creates a new <a>Config</a>.
makeConfig :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> Config

-- | Creates a new <a>Config</a> with a list of environment variables.
makeConfigWithEnvironment :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> [(Text, Text)] -> Config

-- | Retrieve the <a>FilePath</a> of any VCS <a>Status</a>.
filePath :: Status -> FilePath

-- | Retrieve the <a>Modification</a> of any VCS <a>Status</a>.
modification :: Status -> Modification

-- | Retrieve the <a>IsLocked</a> of any VCS <a>Status</a>. For Git, this
--   returns always <a>False</a>.
isLocked :: Status -> IsLocked


-- | Provides high-level Git functions like <tt>commit</tt>,
--   <tt>checkout</tt>, <tt>status</tt>, <tt>log</tt>,...
--   
--   All functions of this module run in the <a>Ctx</a> monad, common to
--   all VCS. On unexpected behavior, these functions will throw a
--   <a>VCSException</a>.
module VCSWrapper.Git

-- | Initialize a new git repository. Executes <tt>git init</tt>.
initDB :: Bool -> Ctx ()

-- | Add files to the index. Executes <tt>git add</tt>.
add :: [FilePath] -> Ctx ()

-- | Remove files from the index and the working directory. Executes
--   <tt>git rm</tt>.
rm :: [FilePath] -> Ctx ()

-- | Commit the current index or the specified files to the repository.
--   Executes <tt>git commit</tt>.
commit :: [FilePath] -> Maybe (Text, Text) -> Text -> [Text] -> Ctx ()

-- | Checkout the index to some commit ID. Executes <tt>git checkout</tt>.
checkout :: Maybe Text -> Maybe Text -> Ctx ()

-- | Return status of the repository as a list of <a>Status</a>. Executes
--   <tt>git status</tt>.
status :: Ctx [Status]

-- | Get all commit messages. Executes <tt>git log</tt>.
simpleLog :: Maybe Text -> Ctx [LogEntry]

-- | Get all local branches. Executes <tt>git branch</tt>.
localBranches :: Ctx (Text, [Text])

-- | Rev-parse a revision. Executes <tt>git rev-parse</tt>.
revparse :: Text -> Ctx (Text)

-- | Get all remotes. Executes <tt>git remote</tt>.
remote :: Ctx [Text]

-- | Pull changes from the remote as configured in the git configuration.
--   If a merge conflict is detected, the error message is returned,
--   otherwise 'Right ()' is returned. Executes <tt>git pull</tt>.
pull :: Ctx (Either Text ())

-- | Push changes to the remote as configured in the git configuration.
--   Executes <tt>git push</tt>.
push :: Ctx ()

-- | Run a VCS <a>Ctx</a> from a <a>Config</a> and returns the result
runVcs :: Config -> Ctx t -> IO t

-- | Available VCS types implemented in this package.
data VCSType
SVN :: VCSType
GIT :: VCSType
Mercurial :: VCSType

-- | <a>True</a>, if this file is locked by the VCS.
type IsLocked = Bool

-- | Represents a log entry in the history managed by the VCS.
data LogEntry
LogEntry :: Maybe Text -> Text -> Text -> Text -> Text -> Text -> Text -> LogEntry

-- | Maybe Branchname
[mbBranch] :: LogEntry -> Maybe Text

-- | Commit identifier
[commitID] :: LogEntry -> Text

-- | Author of this commit.
[author] :: LogEntry -> Text

-- | Email address of the author.
[email] :: LogEntry -> Text

-- | Date this log entry was created.
[date] :: LogEntry -> Text

-- | Short commit message.
[subject] :: LogEntry -> Text

-- | Long body of the commit message.
[body] :: LogEntry -> Text

-- | Context for all VCS commands.
--   
--   E.g. to create a new Git repository use something like this:
--   
--   <pre>
--   import VCSWrapper.Git
--   myInitRepoFn = do
--       let config = makeConfig "path/to/repo" Nothing Nothing
--       runVcs config $ initDB False
--   </pre>
newtype Ctx a
Ctx :: (ReaderT Config IO a) -> Ctx a

-- | Configuration of the <a>Ctx</a> the VCS commands will be executed in.
data Config
Config :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> [(Text, Text)] -> Config

-- | Path to the main directory of the repository. E.g. for Git: the
--   directory of the repository containing the <tt>.git</tt> config
--   directory.
[configCwd] :: Config -> Maybe FilePath

-- | Path to the vcs executable. If <a>Nothing</a>, the PATH environment
--   variable will be search for a matching executable.
[configPath] :: Config -> Maybe FilePath

-- | Author to be used for different VCS actions. If <a>Nothing</a>, the
--   default for the selected repository will be used.
[configAuthor] :: Config -> Maybe Author

-- | List of environment variables mappings passed to the underlying VCS
--   executable.
[configEnvironment] :: Config -> [(Text, Text)]

-- | Author to be passed to VCS commands where applicable.
data Author
Author :: Text -> Maybe Text -> Author

-- | Name of the author.
[authorName] :: Author -> Text

-- | Email address of the author.
[authorEmail] :: Author -> Maybe Text

-- | This <a>Exception</a>-type will be thrown if a VCS command fails
--   unexpectedly.
data VCSException

-- | Exit code -&gt; stdout -&gt; errout -&gt; <a>configCwd</a> of the
--   <a>Config</a> -&gt; List containing the executed command and its
--   options
VCSException :: Int -> Text -> Text -> FilePath -> [Text] -> VCSException

-- | Status of a file managed by the respective VCS.
data Status
SVNStatus :: FilePath -> Modification -> IsLocked -> Status
GITStatus :: FilePath -> Modification -> Status

-- | Flags to describe the state of a file.
data Modification

-- | File hasn't been modified.
None :: Modification

-- | File has been selected to be managed by the respective VCS.
Added :: Modification

-- | File is in conflicting state. Manually resolving the conflict may be
--   necessary.
Conflicting :: Modification

-- | File has been deleted.
Deleted :: Modification

-- | File has been modified since last commit.
Modified :: Modification

-- | File has been replaced by a different file.
Replaced :: Modification

-- | File is currently not known by the VCS.
Untracked :: Modification

-- | State of file is unknown.
Unknown :: Modification

-- | File is ignored by VCS.
Ignored :: Modification

-- | File is missing.
Missing :: Modification

-- | Creates a new <a>Config</a>.
makeConfig :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> Config

-- | Creates a new <a>Config</a> with a list of environment variables.
makeConfigWithEnvironment :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> [(Text, Text)] -> Config

-- | Retrieve the <a>FilePath</a> of any VCS <a>Status</a>.
filePath :: Status -> FilePath

-- | Retrieve the <a>Modification</a> of any VCS <a>Status</a>.
modification :: Status -> Modification

-- | Retrieve the <a>IsLocked</a> of any VCS <a>Status</a>. For Git, this
--   returns always <a>False</a>.
isLocked :: Status -> IsLocked


module VCSWrapper.Mercurial

-- | Add all new files, delete all missing files. Executes <tt>hg
--   addremove</tt>.
addremove :: [FilePath] -> Ctx ()

-- | Commit the specified files or all outstanding changes. Executes <tt>hg
--   commit</tt>.
commit :: [FilePath] -> Text -> [Text] -> Ctx ()

-- | Pull changes from a remote repository to a local one. If a merge
--   conflict is detected, the error message is returned, otherwise 'Right
--   ()' is returned. Executes <tt>hg pull</tt>.
pull :: Ctx ()

-- | Push changesets from the local repository to the default destination.
push :: Ctx ()

-- | Show revision history of entire repository or files. Executes <tt>hg
--   log</tt>.
simpleLog :: Maybe Text -> Ctx [LogEntry]

-- | Update the repository's working directory to the specified changeset.
--   If no changeset is specified, update to the tip of the current named
--   branch.
update :: Maybe Text -> Ctx ()

-- | Show changed files in the working directory as a list of
--   <a>Status</a>. Executes <tt>hg status</tt>.
status :: Ctx [Status]

-- | Run a VCS <a>Ctx</a> from a <a>Config</a> and returns the result
runVcs :: Config -> Ctx t -> IO t

-- | Available VCS types implemented in this package.
data VCSType
SVN :: VCSType
GIT :: VCSType
Mercurial :: VCSType

-- | <a>True</a>, if this file is locked by the VCS.
type IsLocked = Bool

-- | Represents a log entry in the history managed by the VCS.
data LogEntry
LogEntry :: Maybe Text -> Text -> Text -> Text -> Text -> Text -> Text -> LogEntry

-- | Maybe Branchname
[mbBranch] :: LogEntry -> Maybe Text

-- | Commit identifier
[commitID] :: LogEntry -> Text

-- | Author of this commit.
[author] :: LogEntry -> Text

-- | Email address of the author.
[email] :: LogEntry -> Text

-- | Date this log entry was created.
[date] :: LogEntry -> Text

-- | Short commit message.
[subject] :: LogEntry -> Text

-- | Long body of the commit message.
[body] :: LogEntry -> Text

-- | Context for all VCS commands.
--   
--   E.g. to create a new Git repository use something like this:
--   
--   <pre>
--   import VCSWrapper.Git
--   myInitRepoFn = do
--       let config = makeConfig "path/to/repo" Nothing Nothing
--       runVcs config $ initDB False
--   </pre>
newtype Ctx a
Ctx :: (ReaderT Config IO a) -> Ctx a

-- | Configuration of the <a>Ctx</a> the VCS commands will be executed in.
data Config
Config :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> [(Text, Text)] -> Config

-- | Path to the main directory of the repository. E.g. for Git: the
--   directory of the repository containing the <tt>.git</tt> config
--   directory.
[configCwd] :: Config -> Maybe FilePath

-- | Path to the vcs executable. If <a>Nothing</a>, the PATH environment
--   variable will be search for a matching executable.
[configPath] :: Config -> Maybe FilePath

-- | Author to be used for different VCS actions. If <a>Nothing</a>, the
--   default for the selected repository will be used.
[configAuthor] :: Config -> Maybe Author

-- | List of environment variables mappings passed to the underlying VCS
--   executable.
[configEnvironment] :: Config -> [(Text, Text)]

-- | Author to be passed to VCS commands where applicable.
data Author
Author :: Text -> Maybe Text -> Author

-- | Name of the author.
[authorName] :: Author -> Text

-- | Email address of the author.
[authorEmail] :: Author -> Maybe Text

-- | This <a>Exception</a>-type will be thrown if a VCS command fails
--   unexpectedly.
data VCSException

-- | Exit code -&gt; stdout -&gt; errout -&gt; <a>configCwd</a> of the
--   <a>Config</a> -&gt; List containing the executed command and its
--   options
VCSException :: Int -> Text -> Text -> FilePath -> [Text] -> VCSException

-- | Status of a file managed by the respective VCS.
data Status
SVNStatus :: FilePath -> Modification -> IsLocked -> Status
GITStatus :: FilePath -> Modification -> Status

-- | Flags to describe the state of a file.
data Modification

-- | File hasn't been modified.
None :: Modification

-- | File has been selected to be managed by the respective VCS.
Added :: Modification

-- | File is in conflicting state. Manually resolving the conflict may be
--   necessary.
Conflicting :: Modification

-- | File has been deleted.
Deleted :: Modification

-- | File has been modified since last commit.
Modified :: Modification

-- | File has been replaced by a different file.
Replaced :: Modification

-- | File is currently not known by the VCS.
Untracked :: Modification

-- | State of file is unknown.
Unknown :: Modification

-- | File is ignored by VCS.
Ignored :: Modification

-- | File is missing.
Missing :: Modification

-- | Creates a new <a>Config</a>.
makeConfig :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> Config

-- | Creates a new <a>Config</a> with a list of environment variables.
makeConfigWithEnvironment :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> [(Text, Text)] -> Config

-- | Retrieve the <a>FilePath</a> of any VCS <a>Status</a>.
filePath :: Status -> FilePath

-- | Retrieve the <a>Modification</a> of any VCS <a>Status</a>.
modification :: Status -> Modification

-- | Retrieve the <a>IsLocked</a> of any VCS <a>Status</a>. For Git, this
--   returns always <a>False</a>.
isLocked :: Status -> IsLocked


-- | Provides high level SVN functions like <tt>commit</tt>,
--   <tt>checkout</tt>, <tt>update</tt> and others.
--   
--   All functions of this module run in the <a>Ctx</a> monad, common to
--   all VCS. On unexpected behavior, these functions will throw a
--   <a>VCSException</a>. All functions will be executed with options
--   <tt>--non-interactive</tt> and <tt>--no-auth-cache</tt> set.
module VCSWrapper.Svn

-- | Put files and directories under version control, scheduling them for
--   addition to repository. They will be added in next commit.. Executes
--   <tt>svn add</tt>.
add :: [FilePath] -> Maybe Text -> [Text] -> Ctx ()

-- | Checkout out a working copy from a repository. Executes <tt>svn
--   checkout</tt>.
checkout :: [(Text, Maybe Text)] -> Maybe Text -> Maybe Text -> [Text] -> Ctx ()

-- | Send changes from your working copy to the repository. Executes
--   <tt>svn commit</tt>.
commit :: [FilePath] -> Text -> Maybe Text -> [Text] -> Ctx ()

-- | Lock working copy paths or URLs in the repository, so that no other
--   user can commit changes to them. Executes <tt>svn lock</tt>.
lock :: [FilePath] -> Maybe Text -> [Text] -> Ctx ()

-- | Reverts working copy to given revision. Executes <tt>svn merge
--   -rHEAD:$revision .</tt>.
mergeHeadToRevision :: Integer -> Maybe Text -> [Text] -> Ctx ()

-- | Remove <tt>conflicted</tt> state on working copy files or directories.
--   Executes <tt>svn resolved</tt>.
resolved :: [FilePath] -> Maybe Text -> [Text] -> Ctx ()

-- | Get the log messages for the current working copy. Executes <tt>svn
--   log</tt>.
simpleLog :: Ctx [LogEntry]

-- | Unlock working copy paths or URLs. Executes <tt>svn unlock</tt>.
unlock :: [FilePath] -> Maybe Text -> [Text] -> Ctx ()

-- | Bring changes from the repository into the working copy. Executes
--   <tt>svn update</tt>.
update :: Maybe Text -> [Text] -> Ctx ()

-- | Get the status of working copy files and directories. Executes <tt>svn
--   status</tt>.
status :: Ctx [Status]

-- | Returns all files of a conflict indicated by its associated filename.
--   E.g. for file "Types.hs" this might be "Types.hs", "Types.hs.r1",
--   "Types.hs.r2" and "Types.hs.mine"
getFilesInConflict :: FilePath -> Ctx [FilePath]

-- | Run a VCS <a>Ctx</a> from a <a>Config</a> and returns the result
runVcs :: Config -> Ctx t -> IO t

-- | Available VCS types implemented in this package.
data VCSType
SVN :: VCSType
GIT :: VCSType
Mercurial :: VCSType

-- | <a>True</a>, if this file is locked by the VCS.
type IsLocked = Bool

-- | Represents a log entry in the history managed by the VCS.
data LogEntry
LogEntry :: Maybe Text -> Text -> Text -> Text -> Text -> Text -> Text -> LogEntry

-- | Maybe Branchname
[mbBranch] :: LogEntry -> Maybe Text

-- | Commit identifier
[commitID] :: LogEntry -> Text

-- | Author of this commit.
[author] :: LogEntry -> Text

-- | Email address of the author.
[email] :: LogEntry -> Text

-- | Date this log entry was created.
[date] :: LogEntry -> Text

-- | Short commit message.
[subject] :: LogEntry -> Text

-- | Long body of the commit message.
[body] :: LogEntry -> Text

-- | Context for all VCS commands.
--   
--   E.g. to create a new Git repository use something like this:
--   
--   <pre>
--   import VCSWrapper.Git
--   myInitRepoFn = do
--       let config = makeConfig "path/to/repo" Nothing Nothing
--       runVcs config $ initDB False
--   </pre>
newtype Ctx a
Ctx :: (ReaderT Config IO a) -> Ctx a

-- | Configuration of the <a>Ctx</a> the VCS commands will be executed in.
data Config
Config :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> [(Text, Text)] -> Config

-- | Path to the main directory of the repository. E.g. for Git: the
--   directory of the repository containing the <tt>.git</tt> config
--   directory.
[configCwd] :: Config -> Maybe FilePath

-- | Path to the vcs executable. If <a>Nothing</a>, the PATH environment
--   variable will be search for a matching executable.
[configPath] :: Config -> Maybe FilePath

-- | Author to be used for different VCS actions. If <a>Nothing</a>, the
--   default for the selected repository will be used.
[configAuthor] :: Config -> Maybe Author

-- | List of environment variables mappings passed to the underlying VCS
--   executable.
[configEnvironment] :: Config -> [(Text, Text)]

-- | Author to be passed to VCS commands where applicable.
data Author
Author :: Text -> Maybe Text -> Author

-- | Name of the author.
[authorName] :: Author -> Text

-- | Email address of the author.
[authorEmail] :: Author -> Maybe Text

-- | This <a>Exception</a>-type will be thrown if a VCS command fails
--   unexpectedly.
data VCSException

-- | Exit code -&gt; stdout -&gt; errout -&gt; <a>configCwd</a> of the
--   <a>Config</a> -&gt; List containing the executed command and its
--   options
VCSException :: Int -> Text -> Text -> FilePath -> [Text] -> VCSException

-- | Status of a file managed by the respective VCS.
data Status
SVNStatus :: FilePath -> Modification -> IsLocked -> Status
GITStatus :: FilePath -> Modification -> Status

-- | Flags to describe the state of a file.
data Modification

-- | File hasn't been modified.
None :: Modification

-- | File has been selected to be managed by the respective VCS.
Added :: Modification

-- | File is in conflicting state. Manually resolving the conflict may be
--   necessary.
Conflicting :: Modification

-- | File has been deleted.
Deleted :: Modification

-- | File has been modified since last commit.
Modified :: Modification

-- | File has been replaced by a different file.
Replaced :: Modification

-- | File is currently not known by the VCS.
Untracked :: Modification

-- | State of file is unknown.
Unknown :: Modification

-- | File is ignored by VCS.
Ignored :: Modification

-- | File is missing.
Missing :: Modification

-- | Creates a new <a>Config</a>.
makeConfig :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> Config

-- | Creates a new <a>Config</a> with a list of environment variables.
makeConfigWithEnvironment :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> [(Text, Text)] -> Config

-- | Retrieve the <a>FilePath</a> of any VCS <a>Status</a>.
filePath :: Status -> FilePath

-- | Retrieve the <a>Modification</a> of any VCS <a>Status</a>.
modification :: Status -> Modification

-- | Retrieve the <a>IsLocked</a> of any VCS <a>Status</a>. For Git, this
--   returns always <a>False</a>.
isLocked :: Status -> IsLocked
