summaryrefslogtreecommitdiff
path: root/Remote/Git.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-20 12:44:25 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-20 12:44:25 -0400
commit50d35a77f6ad083c6eead5439e9d0ca91ee03dc5 (patch)
tree6021c5f39d2d6fe4a1ffe80e8d0895c2281ca210 /Remote/Git.hs
parent6f92da2474f66c0ffa3ee741383cb12cc462b61e (diff)
parent244a312b17a8ba825507296f52ab9357220102c0 (diff)
Merge branch 'safesemaphore'
Conflicts: debian/changelog git-annex.cabal
Diffstat (limited to 'Remote/Git.hs')
-rw-r--r--Remote/Git.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs
index cc524fd30..860a53e18 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -39,6 +39,7 @@ import Types.Key
import qualified Fields
import Control.Concurrent
+import Control.Concurrent.MSampleVar
import System.Process (std_in, std_err)
remote :: RemoteType
@@ -290,9 +291,9 @@ copyFromRemote r key file dest
: maybe [] (\f -> [(Fields.associatedFile, f)]) file
Just (cmd, params) <- git_annex_shell r "transferinfo"
[Param $ key2file key] fields
- v <- liftIO $ newEmptySampleVar
+ v <- liftIO $ newEmptySV
tid <- liftIO $ forkIO $ void $ tryIO $ do
- bytes <- readSampleVar v
+ bytes <- readSV v
p <- createProcess $
(proc cmd (toCommand params))
{ std_in = CreatePipe
@@ -305,8 +306,8 @@ copyFromRemote r key file dest
hFlush h
send bytes
forever $
- send =<< readSampleVar v
- let feeder = writeSampleVar v
+ send =<< readSV v
+ let feeder = writeSV v
bracketIO noop (const $ tryIO $ killThread tid) (a feeder)
copyFromRemoteCheap :: Git.Repo -> Key -> FilePath -> Annex Bool