rsync special remote: Stop displaying rsync progress, and use git-annex's own progres...
authorJoey Hess <joeyh@joeyh.name>
Mon, 9 Aug 2021 16:06:10 +0000 (12:06 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 9 Aug 2021 16:06:10 +0000 (12:06 -0400)
Reasons are same as in commit cee14f147ac229c99f001b3a0aaaefb4cb6f7785.
(It was already done when using -J.)

Sponsored-by: Mark Reidenbach on Patreon
CHANGELOG
Remote/Rsync.hs

index e48820bb44f7673d9684441f5288cb7b3910db99..5e2bdfacd04fcbc76bb5783a92b66cae2fd538ba 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,8 @@ git-annex (8.20210804) UNRELEASED; urgency=medium
     rather than needing to be advanced each time a new change is made.
   * Misuse of GIT_ANNEX_VECTOR_CLOCK will no longer confuse git-annex.
   * add: When adding a dotfile, avoid treating its name as an extension.
+  * rsync special remote: Stop displaying rsync progress, and use
+    git-annex's own progress display.
 
  -- Joey Hess <id@joeyh.name>  Tue, 03 Aug 2021 12:22:45 -0400
 
index ffb54aaf1eab302d46f4f7b652eb53b121d8960f..79c273d78003af062a173d4dc9247f4a9d239b3d 100644 (file)
@@ -76,10 +76,7 @@ gen r u rc gc rs = do
                fromMaybe (giveup "missing rsyncurl") $ remoteAnnexRsyncUrl gc
        let o = genRsyncOpts c gc transport url
        let islocal = rsyncUrlIsPath $ rsyncUrl o
-       let specialcfg = (specialRemoteCfg c)
-               -- Rsync displays its own progress.
-               { displayProgress = False }
-       return $ Just $ specialRemote' specialcfg c
+       return $ Just $ specialRemote' (specialRemoteCfg c) c
                (fileStorer $ store o)
                (fileRetriever $ retrieve o)
                (remove o)
@@ -381,13 +378,12 @@ showResumable a = ifM a
 
 rsyncRemote :: Direction -> RsyncOpts -> Maybe MeterUpdate -> [CommandParam] -> Annex Bool
 rsyncRemote direction o m params = do
-       showOutput -- make way for progress bar
        opts <- mkopts
        let ps = opts ++ Param "--progress" : params
        case m of
                Nothing -> liftIO $ rsync ps
                Just meter -> do
-                       oh <- mkOutputHandler
+                       oh <- mkOutputHandlerQuiet
                        liftIO $ rsyncProgress oh meter ps
   where
        mkopts