diff options
author | Joey Hess <joey@kitenet.net> | 2013-03-28 17:03:04 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-03-28 17:04:37 -0400 |
commit | 23bfeef5d168666d17343d5484974b7b65db5441 (patch) | |
tree | 38c936657bb183e162ed7b7ce02419eff3baaedb /Remote/Helper | |
parent | 45503f3ce47c95e5c9a3f15621df02b108d1a1c9 (diff) |
webapp: Progess bar fixes for many types of special remotes.
There was confusion in different parts of the progress bar code about
whether an update contained the total number of bytes transferred, or the
number of bytes transferred since the last update. One way this bug
showed up was progress bars that seemed to stick at zero for a long time.
In order to fix it comprehensively, I add a new BytesProcessed data type,
that is explicitly a total quantity of bytes, not a delta.
Note that this doesn't necessarily fix every problem with progress bars.
Particularly, buffering can now cause progress bars to seem to run ahead
of transfers, reaching 100% when data is still being uploaded.
Diffstat (limited to 'Remote/Helper')
-rw-r--r-- | Remote/Helper/Chunked.hs | 2 | ||||
-rw-r--r-- | Remote/Helper/Encryptable.hs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Remote/Helper/Chunked.hs b/Remote/Helper/Chunked.hs index 11b86042e..46678de70 100644 --- a/Remote/Helper/Chunked.hs +++ b/Remote/Helper/Chunked.hs @@ -10,7 +10,7 @@ module Remote.Helper.Chunked where import Common.Annex import Utility.DataUnits import Types.Remote -import Meters +import Utility.Metered import qualified Data.Map as M import qualified Data.ByteString.Lazy as L diff --git a/Remote/Helper/Encryptable.hs b/Remote/Helper/Encryptable.hs index 242fcfe8a..4f0404f2a 100644 --- a/Remote/Helper/Encryptable.hs +++ b/Remote/Helper/Encryptable.hs @@ -15,6 +15,7 @@ import Crypto import qualified Annex import Config.Cost import Utility.Base64 +import Utility.Metered {- Encryption setup for a remote. The user must specify whether to use - an encryption key, or not encrypt. An encrypted cipher is created, or is |