From 89e8441c62b985a6bcf37024fc051e99fbce8e37 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 16 Nov 2015 21:00:54 -0400 Subject: 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. --- Messages/Progress.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Messages') 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. -} -- cgit v1.2.3