aboutsummaryrefslogtreecommitdiff
path: root/Remote/Helper/Ssh.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-04-03 16:48:30 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-04-03 16:48:30 -0400
commitd660e2443b99817a33127443e5d7314c99c291fc (patch)
tree4ae14e3f1d2c58c4ffd075ccee9d6b59caa0665f /Remote/Helper/Ssh.hs
parentff10867b8d11c734bc971f6fa4e86be94c15a7b1 (diff)
WIP on making --quiet silence progress, and infra for concurrent progress bars
Diffstat (limited to 'Remote/Helper/Ssh.hs')
-rw-r--r--Remote/Helper/Ssh.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/Remote/Helper/Ssh.hs b/Remote/Helper/Ssh.hs
index 3addf2384..cbb78ee81 100644
--- a/Remote/Helper/Ssh.hs
+++ b/Remote/Helper/Ssh.hs
@@ -17,6 +17,7 @@ import CmdLine.GitAnnexShell.Fields (Field, fieldName)
import qualified CmdLine.GitAnnexShell.Fields as Fields
import Types.Key
import Remote.Helper.Messages
+import Messages.Progress
import Utility.Metered
import Utility.Rsync
import Types.Remote
@@ -100,9 +101,14 @@ dropKey r key = onRemote r (boolSystem, return False) "dropkey"
[]
rsyncHelper :: Maybe MeterUpdate -> [CommandParam] -> Annex Bool
-rsyncHelper callback params = do
+rsyncHelper m params = do
showOutput -- make way for progress bar
- ifM (liftIO $ (maybe rsync rsyncProgress callback) params)
+ a <- case m of
+ Nothing -> return $ rsync params
+ Just meter -> do
+ h <- mkProgressHandler meter
+ return $ rsyncProgress h params
+ ifM (liftIO a)
( return True
, do
showLongNote "rsync failed -- run git annex again to resume file transfer"