summaryrefslogtreecommitdiff
path: root/Remote/Rsync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-21 14:50:14 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-21 14:50:14 -0400
commit226781c047a50747f5c60a6cf4920a43cd3a3a73 (patch)
tree0a5ead6c80110d533630db1875a9ebc10dea176d /Remote/Rsync.hs
parent6873d785f050cbfb2aa7bd67fcdb29ab585ec291 (diff)
unify types
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r--Remote/Rsync.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index 5384920fb..c3ef94a71 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -104,10 +104,10 @@ rsyncUrls o k = map use annexHashes
use h = rsyncUrl o </> h k </> rsyncEscape o (f </> f)
f = keyFile k
-store :: RsyncOpts -> Key -> AssociatedFile -> ProgressCallback -> Annex Bool
+store :: RsyncOpts -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool
store o k _f p = rsyncSend o p k <=< inRepo $ gitAnnexLocation k
-storeEncrypted :: RsyncOpts -> (Cipher, Key) -> Key -> ProgressCallback -> Annex Bool
+storeEncrypted :: RsyncOpts -> (Cipher, Key) -> Key -> MeterUpdate -> Annex Bool
storeEncrypted o (cipher, enck) k p = withTmp enck $ \tmp -> do
src <- inRepo $ gitAnnexLocation k
liftIO $ withEncryptedContent cipher (L.readFile src) $ L.writeFile tmp
@@ -191,7 +191,7 @@ withRsyncScratchDir a = do
nuke d = liftIO $ whenM (doesDirectoryExist d) $
removeDirectoryRecursive d
-rsyncRemote :: RsyncOpts -> (Maybe ProgressCallback) -> [CommandParam] -> Annex Bool
+rsyncRemote :: RsyncOpts -> (Maybe MeterUpdate) -> [CommandParam] -> Annex Bool
rsyncRemote o callback params = do
showOutput -- make way for progress bar
ifM (liftIO $ (maybe rsync rsyncProgress callback) ps)
@@ -207,7 +207,7 @@ rsyncRemote o callback params = do
{- To send a single key is slightly tricky; need to build up a temporary
directory structure to pass to rsync so it can create the hash
directories. -}
-rsyncSend :: RsyncOpts -> ProgressCallback -> Key -> FilePath -> Annex Bool
+rsyncSend :: RsyncOpts -> MeterUpdate -> Key -> FilePath -> Annex Bool
rsyncSend o callback k src = withRsyncScratchDir $ \tmp -> do
let dest = tmp </> Prelude.head (keyPaths k)
liftIO $ createDirectoryIfMissing True $ parentDir dest