hide rsync progress output when metered but not in other uses of rsync

This commit is contained in:
Joey Hess 2018-03-12 18:36:07 -04:00
parent 85450f94d6
commit 1c2c8995ac
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 20 additions and 17 deletions

View file

@ -16,7 +16,6 @@ import Annex.Ssh
import CmdLine.GitAnnexShell.Fields (Field, fieldName)
import qualified CmdLine.GitAnnexShell.Fields as Fields
import Remote.Helper.Messages
import Messages.Progress
import Utility.Metered
import Utility.Rsync
import Utility.SshHost
@ -111,15 +110,11 @@ dropKey r key = onRemote NoConsumeStdin r (boolSystem, return False) "dropkey"
]
[]
rsyncHelper :: Maybe MeterUpdate -> [CommandParam] -> Annex Bool
rsyncHelper m params = do
rsyncHelper :: OutputHandler -> Maybe MeterUpdate -> [CommandParam] -> Annex Bool
rsyncHelper oh m params = do
a <- case m of
Nothing -> do
showOutput -- make way for progress bar
return $ rsync params
Just meter -> do
oh <- mkOutputHandlerQuiet
return $ rsyncProgress oh meter params
Nothing -> return $ rsync params
Just meter -> return $ rsyncProgress oh meter params
ifM (liftIO a)
( return True
, do