packages feed

HsSVN 0.3.3 → 0.4

raw patch · 9 files changed

+23/−30 lines, 9 files

Files

HsSVN.cabal view
@@ -4,7 +4,7 @@     HsSVN is a (part of) Subversion binding for Haskell. Currently it     can do most things related to the Subversion FS but others are     left uncovered.-Version:       0.3.3+Version:       0.4 License:       PublicDomain License-File:  COPYING Author:        PHO <pho at cielonegro dot org>@@ -13,7 +13,7 @@ Homepage:      http://cielonegro.org/HsSVN.html Category:      System Tested-With:   GHC == 6.8.1-Cabal-Version: >= 1.2+Cabal-Version: >= 1.2.3 Build-Type: Configure  Extra-Source-Files:
NEWS view
@@ -1,3 +1,7 @@+Changes from 0.3.3 to 0.4+-------------------------+* Fixed breakage on GHC 6.10.1. And now it requires 6.10.1...+ Changes from 0.3.2 to 0.3.3 --------------------------- * configure:
Subversion.hsc view
@@ -15,10 +15,7 @@     )     where -import           Control.Exception-import           Subversion.Error - foreign import ccall "HsSVN_initialize"         _initialize :: IO Int @@ -31,13 +28,5 @@ withSubversion f     = do ret <- _initialize          case ret of-           0 -> catchDyn f rethrowSvnError+           0 -> f            _ -> fail "Subversion: failed to initialize APR."---rethrowSvnError :: SvnError -> IO a-rethrowSvnError err-    = let code = svnErrCode err-          msg  = svnErrMsg  err-      in-        fail $ "withSubversion: caught an SvnError: " ++ (show code) ++ ": " ++ msg
Subversion/Error.hsc view
@@ -1,10 +1,10 @@ {- -*- haskell -*- -} --- #prune+{-# OPTIONS_HADDOCK prune #-}  -- |Common exception handling for Subversion. The C API of the -- Subversion returns an error as a function result, but in HsSVN--- errors are thrown as a DynException.+-- errors are thrown as an 'Control.Exception.Exception'.  #include "HsSVN.h" @@ -19,8 +19,6 @@      , svnErr -- private -    , throwSvnErr-     , SvnErrCode(..)     )     where@@ -39,7 +37,14 @@  data SVN_ERROR_T +instance Show SvnError where+    show e = "SvnError " ++ show (svnErrCode e) ++ " " ++ show (svnErrMsg e) +instance Exception SvnError where+    toException = SomeException+    fromException (SomeException e) = cast e++ foreign import ccall "svn_err_best_message"         _best_message :: Ptr SVN_ERROR_T -> Ptr CChar -> APR_SIZE_T -> IO (Ptr CChar) @@ -85,12 +90,7 @@     = do err <- wrapSvnError =<< f          case err of            Nothing -> return ()-           Just e  -> throwSvnErr e---- |@'throwSvnErr' err@ throws an 'SvnError' object in an IO--- monad. You usually don't need to use this directly.-throwSvnErr :: SvnError -> IO a-throwSvnErr = throwIO . DynException . toDyn+           Just e  -> throwIO e  -- |@'SvnErrCode'@ represents a Subversion error code. As you see, not -- all errors are translated to Haskell constructors yet. Uncovered
Subversion/FileSystem.hsc view
@@ -1,6 +1,6 @@ {- -*- haskell -*- -} --- #prune+{-# OPTIONS_HADDOCK prune #-}  -- |An interface to the Subversion filesystem. 
Subversion/FileSystem/Root.hsc view
@@ -1,6 +1,6 @@ {- -*- haskell -*- -} --- #prune+{-# OPTIONS_HADDOCK prune #-}  -- |An interface to functions that work on both existing revisions and -- ongoing transactions in a filesystem.
Subversion/FileSystem/Transaction.hsc view
@@ -1,6 +1,6 @@ {- -*- haskell -*- -} --- #prune+{-# OPTIONS_HADDOCK prune #-}  -- |An interface to functions that work on a filesystem transaction. 
Subversion/Repository.hsc view
@@ -213,7 +213,7 @@                       -> if svnErrCode e == FsConflict then                              return . Left =<< peekCString =<< peek conflictPathPtrPtr                          else-                             throwSvnErr e+                             throwIO e  -- |@'doReposTxn'@ tries to do the transaction. If it succeeds -- 'doReposTxn' automatically commits it, but if it throws an@@ -243,7 +243,7 @@     = do txn <- beginTxn repos revNum author logMsg          handle (cleanUp txn) (tryTxn txn)     where-      cleanUp :: Transaction -> Exception -> IO a+      cleanUp :: Transaction -> SomeException -> IO a       cleanUp txn exn           = abortTxn txn             >>
Subversion/Types.hsc view
@@ -1,6 +1,6 @@ {- -*- haskell -*- -} --- #prune+{-# OPTIONS_HADDOCK prune #-}  -- |Some type definitions for Subversion.