summaryrefslogtreecommitdiff
path: root/Remote/Bup.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/Bup.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/Bup.hs')
-rw-r--r--Remote/Bup.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Remote/Bup.hs b/Remote/Bup.hs
index e3ba7fe9b..fb4e5a48c 100644
--- a/Remote/Bup.hs
+++ b/Remote/Bup.hs
@@ -113,14 +113,14 @@ bupSplitParams r buprepo k src = do
return $ bupParams "split" buprepo
(os ++ [Param "-n", Param (bupRef k), src])
-store :: Git.Repo -> BupRepo -> Key -> AssociatedFile -> Annex Bool
-store r buprepo k _f = do
+store :: Git.Repo -> BupRepo -> Key -> AssociatedFile -> ProgressCallback -> Annex Bool
+store r buprepo k _f p = do
src <- inRepo $ gitAnnexLocation k
params <- bupSplitParams r buprepo k (File src)
liftIO $ boolSystem "bup" params
-storeEncrypted :: Git.Repo -> BupRepo -> (Cipher, Key) -> Key -> Annex Bool
-storeEncrypted r buprepo (cipher, enck) k = do
+storeEncrypted :: Git.Repo -> BupRepo -> (Cipher, Key) -> Key -> ProgressCallback -> Annex Bool
+storeEncrypted r buprepo (cipher, enck) k p = do
src <- inRepo $ gitAnnexLocation k
params <- bupSplitParams r buprepo enck (Param "-")
liftIO $ catchBoolIO $