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 /Messages | |
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 'Messages')
-rw-r--r-- | Messages/Progress.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Messages/Progress.hs b/Messages/Progress.hs index 24a68c922..c14e7e6b1 100644 --- a/Messages/Progress.hs +++ b/Messages/Progress.hs @@ -29,8 +29,8 @@ import Data.Quantity {- Shows a progress meter while performing a transfer of a key. - The action is passed a callback to use to update the meter. -} -metered :: Maybe MeterUpdate -> Key -> AssociatedFile -> (MeterUpdate -> Annex a) -> Annex a -metered combinemeterupdate key _af a = case keySize key of +metered :: Maybe MeterUpdate -> Key -> (MeterUpdate -> Annex a) -> Annex a +metered combinemeterupdate key a = case keySize key of Nothing -> nometer Just size -> withOutputType (go $ fromInteger size) where @@ -66,10 +66,10 @@ metered combinemeterupdate key _af a = case keySize key of {- Use when the progress meter is only desired for concurrent - output; as when a command's own progress output is preferred. -} -concurrentMetered :: Maybe MeterUpdate -> Key -> AssociatedFile -> (MeterUpdate -> Annex a) -> Annex a -concurrentMetered combinemeterupdate key af a = withOutputType go +concurrentMetered :: Maybe MeterUpdate -> Key -> (MeterUpdate -> Annex a) -> Annex a +concurrentMetered combinemeterupdate key a = withOutputType go where - go (ConcurrentOutput _) = metered combinemeterupdate key af a + go (ConcurrentOutput _) = metered combinemeterupdate key a go _ = a (fromMaybe (const noop) combinemeterupdate) {- Progress dots. -} |