summaryrefslogtreecommitdiff
path: root/Types
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-13 16:16:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-13 16:30:34 -0400
commit571cd1c57aeb4e8071b30caf529a0845e8ddc7cf (patch)
treee895c99334d675cec3f7996cb6c298fb7751b33b /Types
parent89cc1d2a38a1abaaecdfb7766739f3c2b5dbf963 (diff)
split cost out into its own module
Added a function to insert a new cost into a list, which could be used to asjust costs after a drag and drop.
Diffstat (limited to 'Types')
-rw-r--r--Types/GitConfig.hs3
-rw-r--r--Types/Remote.hs3
2 files changed, 4 insertions, 2 deletions
diff --git a/Types/GitConfig.hs b/Types/GitConfig.hs
index 9c6de59d7..b42f8f229 100644
--- a/Types/GitConfig.hs
+++ b/Types/GitConfig.hs
@@ -16,6 +16,7 @@ import Common
import qualified Git
import qualified Git.Config
import Utility.DataUnits
+import Config.Cost
{- Main git-annex settings. Each setting corresponds to a git-config key
- such as annex.foo -}
@@ -77,7 +78,7 @@ extractGitConfig r = GitConfig
- key such as <remote>.annex-foo, or if that is not set, a default from
- annex.foo -}
data RemoteGitConfig = RemoteGitConfig
- { remoteAnnexCost :: Maybe Int
+ { remoteAnnexCost :: Maybe Cost
, remoteAnnexCostCommand :: Maybe String
, remoteAnnexIgnore :: Bool
, remoteAnnexSync :: Bool
diff --git a/Types/Remote.hs b/Types/Remote.hs
index 05763e4d3..b8c603c65 100644
--- a/Types/Remote.hs
+++ b/Types/Remote.hs
@@ -17,6 +17,7 @@ import Types.Key
import Types.UUID
import Types.Meters
import Types.GitConfig
+import Config.Cost
type RemoteConfigKey = String
type RemoteConfig = M.Map RemoteConfigKey String
@@ -46,7 +47,7 @@ data RemoteA a = Remote {
-- each Remote has a human visible name
name :: String,
-- Remotes have a use cost; higher is more expensive
- cost :: Int,
+ cost :: Cost,
-- Transfers a key to the remote.
storeKey :: Key -> AssociatedFile -> MeterUpdate -> a Bool,
-- retrieves a key's contents to a file