vcswrapper 0.0.3 → 0.0.4
raw patch · 6 files changed
+24/−25 lines, 6 filesdep +splitdep +textdep −MissingH
Dependencies added: split, text
Dependencies removed: MissingH
Files
- src/VCSWrapper/Git.hs +2/−4
- src/VCSWrapper/Git/Parsers.hs +3/−3
- src/VCSWrapper/Mercurial/Parsers.hs +2/−3
- src/VCSWrapper/Svn.hs +2/−2
- src/VCSWrapper/Svn/Parsers.hs +2/−3
- vcswrapper.cabal +13/−10
src/VCSWrapper/Git.hs view
@@ -40,8 +40,6 @@ import Control.Monad.Trans import qualified Control.Exception as Exc -import Data.List.Utils- import VCSWrapper.Git.Parsers import VCSWrapper.Git.Process import VCSWrapper.Git.Types@@ -50,7 +48,7 @@ import Data.Maybe import qualified Data.List-import Data.String.Utils (strip)+import Data.Text (strip, pack, unpack) {- | Initialize a new git repository. Executes @git init@. -}@@ -151,7 +149,7 @@ -> Ctx (String) revparse commit = do o <- gitExec "rev-parse" [commit] []- return $ strip o+ return . unpack . strip $ pack o
src/VCSWrapper/Git/Parsers.hs view
@@ -20,8 +20,8 @@ , parsePullMergeConflict ) where -import Data.List.Utils import Data.List+import Data.List.Split (splitOn) import Text.ParserCombinators.Parsec @@ -35,7 +35,7 @@ ++ [ GITStatus filepath Added | (x:_:_:filepath) <- lines, x == 'A'] -- A only displayed in second column ++ [ GITStatus filepath Deleted | (x:y:_:filepath) <- lines, x == 'D' || y == 'D'] -- D flag depends on index state (both columns) where- lines = split "\n" status+ lines = splitOn "\n" status -- | Parse the output of @git branch@. parseBranches :: String -> (String, [String]) -- ^ (currently checked out branch, list of all other branches)@@ -46,7 +46,7 @@ -- | Parse @git remote@. parseRemotes :: String -> [String]-parseRemotes = split "\n"+parseRemotes = splitOn "\n" -- | Parse output of @git pull@ and return if the repository is in conflict state. parsePullMergeConflict :: String -> Bool
src/VCSWrapper/Mercurial/Parsers.hs view
@@ -19,9 +19,8 @@ ) where import qualified VCSWrapper.Mercurial.Types as Common-import Data.List.Utils import Text.XML.HXT.Core-+import Data.List.Split (splitOn) {- | Parses given 'String' and returns a list of 'Status'.@@ -31,7 +30,7 @@ parseStatusOut out = parseRows rows where rows = init' splitRows- splitRows = split "\n" out :: [String]+ splitRows = splitOn "\n" out :: [String] -- | Parse the output of @hg branch -q@. parseBranches :: String -> [String] -- ^ list of all branches
src/VCSWrapper/Svn.hs view
@@ -45,9 +45,9 @@ import VCSWrapper.Common.TemporaryFiles import Control.Monad.Reader import Data.Maybe+import Data.List (isPrefixOf) import System.IO -import Data.List.Utils(startswith) import Control.Monad (filterM) import System.Directory(doesFileExist, getDirectoryContents) import System.FilePath(combine, splitFileName)@@ -186,7 +186,7 @@ content <- getDirectoryContents fileD let contentWithD = map (\cN -> combine fileD cN) content files <- filterM doesFileExist contentWithD- let filesToResolve = [f | f <- files, (startswith (file++".r") f) || (f == (file++".mine"))]++[file]+ let filesToResolve = [f | f <- files, (isPrefixOf (file++".r") f) || (f == (file++".mine"))]++[file] return filesToResolve
src/VCSWrapper/Svn/Parsers.hs view
@@ -19,8 +19,7 @@ import Data.Maybe import System.Exit import Text.XML.HXT.Core-import Data.List.Utils-+import Data.List.Split (splitOn) import qualified VCSWrapper.Common.Types as Common instance XmlPickler Log where@@ -47,7 +46,7 @@ parseStatusOut out = parseRows rows where rows = init' splitRows- splitRows = split "\n" out :: [String]+ splitRows = splitOn "\n" out :: [String] --
vcswrapper.cabal view
@@ -1,11 +1,11 @@ name: vcswrapper-version: 0.0.3+version: 0.0.4 cabal-version: >= 1.8 build-type: Simple license: GPL license-file: LICENSE copyright: 2011 Stephan Fortelny, Harald Jagenteufel-maintainer: stephanfortelny at gmail.com, h.jagenteufel at gmail.com+maintainer: stephanfortelny at gmail.com, h.jagenteufel at gmail.com, hamish.k.mackenzie at gmail.com homepage: https://github.com/forste/haskellVCSWrapper bug-reports: https://github.com/forste/haskellVCSWrapper/issues synopsis: Wrapper for source code management systems@@ -13,23 +13,25 @@ Provides simple haskell functions to call external source code management systems. Currently git and SVN are supported. category: Development-author: Stephan Fortelny, Harald Jagenteufel+author: Stephan Fortelny, Harald Jagenteufel, Hamish Mackenzie tested-with: GHC == 7.0 data-files: LICENSE README data-dir: . library- build-depends: MissingH >=1.1.0.3 && <1.3,+ build-depends: base >=4.0.0.0 && <4.8, directory >=1.1.0.0 && <1.3, hxt >=9.1.2 && <9.4, mtl >=2.0.1.0 && <2.2, parsec >=3.1.1 && <3.2, process >=1.0.1.5 && <1.3,- filepath >=1.2.0.0 && < 1.4+ filepath >=1.2.0.0 && < 1.4,+ split >=0.2.2 && <0.3,+ text >=0.11.1.5 && <1.2 exposed-modules: VCSWrapper.Common VCSWrapper.Git VCSWrapper.Svn VCSWrapper.Mercurial- other-modules: - VCSWrapper.Svn.Types VCSWrapper.Svn.Process VCSWrapper.Svn.Parsers + other-modules:+ VCSWrapper.Svn.Types VCSWrapper.Svn.Process VCSWrapper.Svn.Parsers VCSWrapper.Git.Types VCSWrapper.Git.Parsers VCSWrapper.Common.Types VCSWrapper.Git.Process VCSWrapper.Mercurial.Process VCSWrapper.Mercurial.Types VCSWrapper.Mercurial.Parsers VCSWrapper.Common.Process VCSWrapper.Common.TemporaryFiles@@ -40,18 +42,19 @@ executable vcswrapper main-is: Main.hs- build-depends: MissingH >=1.1.0.3 && <1.3,+ build-depends: base >=4.0.0.0 && <4.8, directory >=1.1.0.0 && <1.3, hxt >=9.1.2 && <9.4, mtl >=2.0.1.0 && <2.2, parsec >=3.1.1 && <3.2, process >=1.0.1.5 && <1.3,- filepath >=1.2.0.0 && < 1.4+ filepath >=1.2.0.0 && < 1.4,+ split >=0.2.2 && <0.3 buildable: True hs-source-dirs: src other-modules:- VCSWrapper.Svn.Types VCSWrapper.Svn.Process VCSWrapper.Svn.Parsers + VCSWrapper.Svn.Types VCSWrapper.Svn.Process VCSWrapper.Svn.Parsers VCSWrapper.Git.Types VCSWrapper.Git.Parsers VCSWrapper.Common.Types VCSWrapper.Mercurial.Process VCSWrapper.Mercurial.Types VCSWrapper.Mercurial.Parsers VCSWrapper.Common.Process VCSWrapper.Common.TemporaryFiles