packages feed

filestore 0.6 → 0.6.0.1

raw patch · 6 files changed

+32/−30 lines, 6 filesdep ~Diffsetup-changedPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: Diff

API changes (from Hackage documentation)

Files

CHANGES view
@@ -1,3 +1,16 @@+Version 0.6.0.1 released 20 Mar 2013++* runProcess now allows access to the current environment, instead of+  running in a bare environment.  This fixes problems for those who have+  git in a nonstandard path. (Jochen Keil)++* Allow latest Diff.++* Reconfigured cabal file to use new Cabal test framework.  Run tests with+  `cabal configure --enable-tests && cabal build &&  cabal test`.++* Set environment variable HGENCODING for mercurial.  Closes #6.+ Version 0.6 released 31 Dec 2012  * Updated to use Diff 0.2.  This involves an API change:
Data/FileStore/MercurialCommandServer.hs view
@@ -61,7 +61,8 @@ -- | Run a mercurial command directly without using the server. rawRunMercurialCommand :: FilePath -> String -> [String] -> IO (ExitCode, String, BL.ByteString) rawRunMercurialCommand repo command args = do-   (status, err, out) <- runShellCommand repo Nothing "hg" (command : args)+   let env = [("HGENCODING","utf8")]+   (status, err, out) <- runShellCommand repo (Just env) "hg" (command : args)    return (status, LUTF8.toString err, out)  -- | Create a new command server for the given repository
Data/FileStore/Utils.hs view
@@ -27,7 +27,8 @@         , encodeArg ) where  import Control.Exception (throwIO)-import Control.Monad (liftM, when, unless)+import Control.Applicative ((<$>))+import Control.Monad (liftM, liftM2, when, unless) import Data.ByteString.Lazy.UTF8 (toString) import Data.Char (isSpace) import Data.List (intersect, nub, isPrefixOf, isInfixOf)@@ -39,6 +40,7 @@ import System.IO (openTempFile, hClose) import System.IO.Error (isDoesNotExistError) import System.Process (runProcess, waitForProcess)+import System.Environment (getEnvironment) import qualified Data.ByteString.Lazy as B import qualified Data.ByteString as S import qualified Control.Exception as E@@ -68,7 +70,8 @@   tempPath <- E.catch getTemporaryDirectory (\(_ :: E.SomeException) -> return ".")   (outputPath, hOut) <- openTempFile tempPath "out"   (errorPath, hErr) <- openTempFile tempPath "err"-  hProcess <- runProcess (encodeArg command) (map encodeArg optionList) (Just workingDir) environment Nothing (Just hOut) (Just hErr)+  env <- liftM2 (++) environment . Just <$> getEnvironment+  hProcess <- runProcess (encodeArg command) (map encodeArg optionList) (Just workingDir) env Nothing (Just hOut) (Just hErr)   status <- waitForProcess hProcess   errorOutput <- S.readFile errorPath   output <- S.readFile outputPath
Setup.lhs view
@@ -1,11 +1,3 @@ #!/usr/bin/env runhaskell > import Distribution.Simple-> import System.Process-> import System.Exit--> main = defaultMainWithHooks $ simpleUserHooks { runTests  = runTestSuite }--Run test suite.--> runTestSuite _ _ _ _ = runCommand "./dist/build/test-filestore/test-filestore" >>= waitForProcess >>= exitWith-+> main = defaultMain
filestore.cabal view
@@ -1,6 +1,6 @@ Name:                filestore-Version:             0.6-Cabal-version:       >= 1.8+Version:             0.6.0.1+Cabal-Version:       >= 1.10 Build-type:          Custom Synopsis:            Interface for versioning file stores. Description:         The filestore library provides an abstract interface for a versioning@@ -21,10 +21,6 @@   type:          git   location:      git://github.com/jgm/filestore.git -Flag tests-    default:    False-    description: Build test suite- Flag maxcount     default:     True     description: Make use of a recent (>= 2.3.0) Darcs feature which vastly improves the performance@@ -43,7 +39,7 @@                          time >= 1.1 && < 1.5,                          xml >= 1.3 && < 1.4,                          split >= 0.1 && < 0.3,-                         Diff >= 0.2 && < 0.3,+                         Diff >= 0.2 && < 0.4,                          old-locale >= 1.0 && < 1.1      Exposed-modules:     Data.FileStore, Data.FileStore.Types, Data.FileStore.Git, Data.FileStore.Darcs, Data.FileStore.Mercurial,@@ -52,29 +48,26 @@     Other-modules:       Paths_filestore,                          Data.FileStore.DarcsXml,                          Data.FileStore.MercurialCommandServer-    extensions:          FlexibleInstances, CPP-+    Default-Extensions:  FlexibleInstances, CPP+    Default-Language:    Haskell98     if flag(maxcount)          cpp-options: -DUSE_MAXCOUNT-        extensions: CPP     if impl(ghc >= 6.12)       Ghc-Options:       -Wall -fno-warn-unused-do-bind     else       Ghc-Options:       -Wall     Ghc-Prof-Options:    -auto-all -Executable test-filestore-    if flag(tests)-       Buildable:   True-    else-       Buildable:   False+Test-suite test-filestore+    Type:           exitcode-stdio-1.0     Hs-source-dirs: tests     Main-is:        Tests.lhs+    Default-Language:  Haskell98     Build-depends:  base >= 4 && < 5,                     HUnit >= 1.2 && < 1.3,                     mtl,                     time,-                    Diff,+                    Diff >= 0.2 && < 0.4,                     filepath >= 1.1 && < 1.4,                     directory >= 1.1 && < 1.3,                     filestore
tests/Tests.lhs view
@@ -344,8 +344,8 @@     Diff from Nothing should be diff from empty document.  >   diff'' <- diff fs diffTitle Nothing (Just $ revId firstrev)->   let added'' = [s | Second s <- diff']->   assertEqual "added lines from empty document to first revision" [lines testContents] added''+>   let added'' = concat [x | Second x <- diff'']+>   assertEqual "added lines from empty document to first revision" (lines testContents) added''      Diff to Nothing should be diff to latest.