diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-11-16 21:00:54 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-11-16 21:00:54 -0400 |
commit | 89e8441c62b985a6bcf37024fc051e99fbce8e37 (patch) | |
tree | ef9d04b7f73633a27c187b472efc5142fde62130 /Annex | |
parent | d77b7936adc49a98172a16a3fea89fb2ad9fd642 (diff) |
Display progress meter in -J mode when downloading from the web.
Including in addurl, and get --from web, but also in S3 and External
special remotes when a web url is known for content in those remotes.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Content.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs index 5990d194a..90486f912 100644 --- a/Annex/Content.hs +++ b/Annex/Content.hs @@ -56,6 +56,7 @@ import qualified Annex.Url as Url import Types.Key import Utility.DataUnits import Utility.CopyFile +import Utility.Metered import Config import Git.SharedRepository import Annex.Perms @@ -658,8 +659,11 @@ saveState nocommit = doSideAction $ do Annex.Branch.commit "update" {- Downloads content from any of a list of urls. -} -downloadUrl :: [Url.URLString] -> FilePath -> Annex Bool -downloadUrl urls file = go =<< annexWebDownloadCommand <$> Annex.getGitConfig +downloadUrl :: Key -> MeterUpdate -> [Url.URLString] -> FilePath -> Annex Bool +downloadUrl k p urls file = + concurrentMetered (Just p) k $ \p' -> + watchFileSize file p' $ + go =<< annexWebDownloadCommand <$> Annex.getGitConfig where go Nothing = do a <- ifM commandProgressDisabled |