summaryrefslogtreecommitdiff
path: root/Remote/Rsync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-19 16:08:37 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-19 16:08:37 -0400
commitaff09a1f33be7b3df182a7c85b30a2d3e04833c7 (patch)
tree6d7cb4ed4e9483c14bdd832c9af848dc1b866789 /Remote/Rsync.hs
parent3c81d70c1beccb50571281ef35c9123bac006b7c (diff)
add a progress callback to storeKey, and threaded it all the way through
Transfer info files are updated when the callback is called, updating the number of bytes transferred. Left unused p variables at every place the callback should be used. Which is rather a lot..
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 3655ce483..aba427d4b 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -104,11 +104,11 @@ rsyncUrls o k = map use annexHashes
use h = rsyncUrl o </> h k </> rsyncEscape o (f </> f)
f = keyFile k
-store :: RsyncOpts -> Key -> AssociatedFile -> Annex Bool
-store o k _f = rsyncSend o k <=< inRepo $ gitAnnexLocation k
+store :: RsyncOpts -> Key -> AssociatedFile -> ProgressCallback -> Annex Bool
+store o k _f p = rsyncSend o k <=< inRepo $ gitAnnexLocation k
-storeEncrypted :: RsyncOpts -> (Cipher, Key) -> Key -> Annex Bool
-storeEncrypted o (cipher, enck) k = withTmp enck $ \tmp -> do
+storeEncrypted :: RsyncOpts -> (Cipher, Key) -> Key -> ProgressCallback -> 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
rsyncSend o enck tmp