From 571cd1c57aeb4e8071b30caf529a0845e8ddc7cf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 13 Mar 2013 16:16:01 -0400 Subject: 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. --- Types/GitConfig.hs | 3 ++- Types/Remote.hs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'Types') 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 .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 -- cgit v1.2.3