| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
VCSWrapper.Svn
Description
Provides high level SVN functions like commit, checkout, update and others.
All functions of this module run in the Ctx monad, common to all VCS.
On unexpected behavior, these functions will throw a VCSException.
All functions will be executed with options --non-interactive and --no-auth-cache set.
- add :: [FilePath] -> Maybe Text -> [Text] -> Ctx ()
- checkout :: [(Text, Maybe Text)] -> Maybe Text -> Maybe Text -> [Text] -> Ctx ()
- commit :: [FilePath] -> Text -> Maybe Text -> [Text] -> Ctx ()
- lock :: [FilePath] -> Maybe Text -> [Text] -> Ctx ()
- mergeHeadToRevision :: Integer -> Maybe Text -> [Text] -> Ctx ()
- resolved :: [FilePath] -> Maybe Text -> [Text] -> Ctx ()
- simpleLog :: Ctx [LogEntry]
- unlock :: [FilePath] -> Maybe Text -> [Text] -> Ctx ()
- update :: Maybe Text -> [Text] -> Ctx ()
- status :: Ctx [Status]
- getFilesInConflict :: FilePath -> Ctx [FilePath]
- runVcs :: Config -> Ctx t -> IO t
- data VCSType
- type IsLocked = Bool
- data LogEntry = LogEntry {}
- newtype Ctx a = Ctx (ReaderT Config IO a)
- data Config = Config {
- configCwd :: Maybe FilePath
- configPath :: Maybe FilePath
- configAuthor :: Maybe Author
- configEnvironment :: [(Text, Text)]
- data Author = Author {
- authorName :: Text
- authorEmail :: Maybe Text
- data VCSException = VCSException Int Text Text FilePath [Text]
- data Status
- data Modification
- makeConfig :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> Config
- makeConfigWithEnvironment :: Maybe FilePath -> Maybe FilePath -> Maybe Author -> [(Text, Text)] -> Config
- filePath :: Status -> FilePath
- modification :: Status -> Modification
- isLocked :: Status -> IsLocked
Documentation
Put files and directories under version control, scheduling them for addition to repository.
They will be added in next commit.. Executes svn add.
Arguments
| :: [(Text, Maybe Text)] | list of (url, |
| -> Maybe Text | optional path |
| -> Maybe Text | optional password |
| -> [Text] | options |
| -> Ctx () |
Checkout out a working copy from a repository. Executes svn checkout.
Arguments
| :: [FilePath] | files to commit. List may be empty - if not only specified files will be commited |
| -> Text | message, can be empty |
| -> Maybe Text | optional password |
| -> [Text] | options |
| -> Ctx () |
Send changes from your working copy to the repository. Executes svn commit.
Arguments
| :: [FilePath] | Files to lock, must not be empty |
| -> Maybe Text | optional password |
| -> [Text] | options |
| -> Ctx () |
Lock working copy paths or URLs in the repository, so that no other user can commit changes to
them. Executes svn lock.
Reverts working copy to given revision. Executes svn merge -rHEAD:$revision ..
Arguments
| :: [FilePath] | files or directories to mark resolved |
| -> Maybe Text | optional password |
| -> [Text] | options |
| -> Ctx () |
Remove conflicted state on working copy files or directories. Executes svn resolved.
simpleLog :: Ctx [LogEntry] Source #
Get the log messages for the current working copy. Executes svn log.
Arguments
| :: [FilePath] | Files to unlock, must not be empty |
| -> Maybe Text | optional password |
| -> [Text] | options |
| -> Ctx () |
Unlock working copy paths or URLs. Executes svn unlock.
Bring changes from the repository into the working copy. Executes svn update.
status :: Ctx [Status] Source #
Get the status of working copy files and directories. Executes svn 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"
Available VCS types implemented in this package.
Represents a log entry in the history managed by the VCS.
Constructors
| LogEntry | |
Context for all VCS commands.
E.g. to create a new Git repository use something like this:
import VCSWrapper.Git
myInitRepoFn = do
let config = makeConfig "path/to/repo" Nothing Nothing
runVcs config $ initDB FalseConfiguration of the Ctx the VCS commands will be executed in.
Constructors
| Config | |
Fields
| |
Author to be passed to VCS commands where applicable.
Constructors
| Author | |
Fields
| |
data VCSException Source #
This Exception-type will be thrown if a VCS command fails unexpectedly.
Constructors
| VCSException Int Text Text FilePath [Text] | Exit code -> stdout -> errout -> |
Instances
Status of a file managed by the respective VCS.
Constructors
| SVNStatus FilePath Modification IsLocked | |
| GITStatus FilePath Modification |
data Modification Source #
Flags to describe the state of a file.
Constructors
| None | File hasn't been modified. |
| Added | File has been selected to be managed by the respective VCS. |
| Conflicting | File is in conflicting state. Manually resolving the conflict may be necessary. |
| Deleted | File has been deleted. |
| Modified | File has been modified since last commit. |
| Replaced | File has been replaced by a different file. |
| Untracked | File is currently not known by the VCS. |
| Unknown | State of file is unknown. |
| Ignored | File is ignored by VCS. |
| Missing | File is missing. |
Instances
Arguments
| :: Maybe FilePath | Path to the main directory of the repository. E.g. for Git: the directory of the repository containing the |
| -> Maybe FilePath | Path to the vcs executable. If |
| -> Maybe Author | Author to be used for different VCS actions. If |
| -> Config |
Creates a new Config.
makeConfigWithEnvironment Source #
Arguments
| :: Maybe FilePath | Path to the main directory of the repository. E.g. for Git: the directory of the repository containing the |
| -> Maybe FilePath | Path to the vcs executable. If |
| -> Maybe Author | Author to be used for different VCS actions. If |
| -> [(Text, Text)] | List of environment variables mappings passed to the underlying VCS executable. |
| -> Config |
Creates a new Config with a list of environment variables.
modification :: Status -> Modification Source #
Retrieve the Modification of any VCS Status.