WIP on making --quiet silence progress, and infra for concurrent progress bars
This commit is contained in:
parent
c2c901a6e4
commit
20fb91a7ad
14 changed files with 194 additions and 93 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue