diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-04-03 16:48:30 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-04-03 16:48:30 -0400 |
commit | d660e2443b99817a33127443e5d7314c99c291fc (patch) | |
tree | 4ae14e3f1d2c58c4ffd075ccee9d6b59caa0665f /Remote/Rsync.hs | |
parent | ff10867b8d11c734bc971f6fa4e86be94c15a7b1 (diff) |
WIP on making --quiet silence progress, and infra for concurrent progress bars
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r-- | Remote/Rsync.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs index f39081299..1e7b08892 100644 --- a/Remote/Rsync.hs +++ b/Remote/Rsync.hs @@ -31,6 +31,7 @@ import Remote.Rsync.RsyncUrl import Crypto import Utility.Rsync import Utility.CopyFile +import Messages.Progress import Utility.Metered import Utility.PID import Annex.Perms @@ -281,11 +282,15 @@ showResumable a = ifM a ) rsyncRemote :: Direction -> RsyncOpts -> Maybe MeterUpdate -> [CommandParam] -> Annex Bool -rsyncRemote direction o callback params = do +rsyncRemote direction o m params = do showOutput -- make way for progress bar - liftIO $ (maybe rsync rsyncProgress callback) $ - opts ++ [Params "--progress"] ++ params + case m of + Nothing -> liftIO $ rsync ps + Just meter -> do + h <- mkProgressHandler meter + liftIO $ rsyncProgress h ps where + ps = opts ++ [Params "--progress"] ++ params opts | direction == Download = rsyncDownloadOptions o | otherwise = rsyncUploadOptions o |