diff options
-rw-r--r-- | Backend/URL.hs | 2 | ||||
-rw-r--r-- | Core.hs | 2 | ||||
-rw-r--r-- | Remotes.hs | 5 |
3 files changed, 6 insertions, 3 deletions
diff --git a/Backend/URL.hs b/Backend/URL.hs index 7f0bd6673..384f933eb 100644 --- a/Backend/URL.hs +++ b/Backend/URL.hs @@ -41,7 +41,7 @@ dummyOk url = return True downloadUrl :: Key -> FilePath -> Annex Bool downloadUrl key file = do showNote "downloading" - liftIO $ putStrLn "" -- make way for curl progress bar + showProgress -- make way for curl progress bar liftIO $ boolSystem "curl" ["-#", "-o", file, url] where url = join ":" $ drop 1 $ split ":" $ show key @@ -154,6 +154,8 @@ showNote :: String -> Annex () showNote s = verbose $ do liftIO $ putStr $ "(" ++ s ++ ") " liftIO $ hFlush stdout +showProgress :: Annex () +showProgress = verbose $ liftIO $ putStr $ "\n" showLongNote :: String -> Annex () showLongNote s = verbose $ do liftIO $ putStr $ "\n" ++ (indent s) diff --git a/Remotes.hs b/Remotes.hs index a432e1b5d..66395adcd 100644 --- a/Remotes.hs +++ b/Remotes.hs @@ -39,6 +39,7 @@ import LocationLog import Locations import UUID import Utility +import qualified Core {- Human visible list of remotes. -} list :: [Git.Repo] -> String @@ -200,7 +201,7 @@ copyFromRemote r key file = do where getlocal = liftIO $ boolSystem "cp" ["-a", keyloc, file] getssh = do - liftIO $ putStrLn "" -- make way for scp progress bar + Core.showProgress -- make way for scp progress bar liftIO $ boolSystem "scp" [sshLocation r keyloc, file] keyloc = annexLocation r key @@ -217,7 +218,7 @@ copyToRemote r key file = do where putlocal src = liftIO $ boolSystem "cp" ["-a", src, file] putssh src = do - liftIO $ putStrLn "" -- make way for scp progress bar + Core.showProgress -- make way for scp progress bar liftIO $ boolSystem "scp" [src, sshLocation r file] sshLocation :: Git.Repo -> FilePath -> FilePath |