diff options
author | Joey Hess <joey@kitenet.net> | 2011-03-15 22:04:50 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-03-15 22:04:50 -0400 |
commit | 4594bd51c1754bc7e1fdf03d83569aeea163e761 (patch) | |
tree | c8af87eac86a875d377dce04aa6933218ba817a1 | |
parent | f27df5e6584ed6a09be4a9bb1030be132c2d8051 (diff) |
rename file
-rw-r--r-- | Annex.hs | 10 | ||||
-rw-r--r-- | Backend.hs | 2 | ||||
-rw-r--r-- | Backend/File.hs | 2 | ||||
-rw-r--r-- | Backend/SHA.hs | 2 | ||||
-rw-r--r-- | Backend/URL.hs | 2 | ||||
-rw-r--r-- | Backend/WORM.hs | 2 | ||||
-rw-r--r-- | BackendClass.hs (renamed from BackendTypes.hs) | 2 | ||||
-rw-r--r-- | Command.hs | 4 | ||||
-rw-r--r-- | Command/InAnnex.hs | 4 | ||||
-rw-r--r-- | Key.hs | 3 | ||||
-rw-r--r-- | Types.hs | 2 | ||||
-rw-r--r-- | test.hs | 8 |
12 files changed, 21 insertions, 22 deletions
@@ -25,7 +25,7 @@ import Data.Maybe import qualified GitRepo as Git import qualified GitQueue -import qualified BackendTypes +import qualified BackendClass import Utility -- git-annex's monad @@ -34,8 +34,8 @@ type Annex = StateT AnnexState IO -- internal state storage data AnnexState = AnnexState { repo :: Git.Repo - , backends :: [BackendTypes.Backend Annex] - , supportedBackends :: [BackendTypes.Backend Annex] + , backends :: [BackendClass.Backend Annex] + , supportedBackends :: [BackendClass.Backend Annex] , repoqueue :: GitQueue.Queue , quiet :: Bool , force :: Bool @@ -47,7 +47,7 @@ data AnnexState = AnnexState , remotesread :: Bool } deriving (Show) -newState :: Git.Repo -> [BackendTypes.Backend Annex] -> AnnexState +newState :: Git.Repo -> [BackendClass.Backend Annex] -> AnnexState newState gitrepo allbackends = AnnexState { repo = gitrepo , backends = [] @@ -64,7 +64,7 @@ newState gitrepo allbackends = AnnexState } {- Create and returns an Annex state object for the specified git repo. -} -new :: Git.Repo -> [BackendTypes.Backend Annex] -> IO AnnexState +new :: Git.Repo -> [BackendClass.Backend Annex] -> IO AnnexState new gitrepo allbackends = do gitrepo' <- liftIO $ Git.configRead gitrepo return $ newState gitrepo' allbackends diff --git a/Backend.hs b/Backend.hs index 94755e8d6..e1f8f388b 100644 --- a/Backend.hs +++ b/Backend.hs @@ -40,7 +40,7 @@ import qualified GitRepo as Git import qualified Annex import Types import Key -import qualified BackendTypes as B +import qualified BackendClass as B import Messages {- List of backends in the order to try them when storing a new key. -} diff --git a/Backend/File.hs b/Backend/File.hs index d76cd2939..a5e243199 100644 --- a/Backend/File.hs +++ b/Backend/File.hs @@ -18,7 +18,7 @@ import Control.Monad.State import System.Directory import Data.List -import BackendTypes +import BackendClass import LocationLog import Locations import qualified Remotes diff --git a/Backend/SHA.hs b/Backend/SHA.hs index 3cdc3bf80..056385107 100644 --- a/Backend/SHA.hs +++ b/Backend/SHA.hs @@ -16,7 +16,7 @@ import Data.Maybe import System.Posix.Files import qualified Backend.File -import BackendTypes +import BackendClass import Messages import qualified Annex import Locations diff --git a/Backend/URL.hs b/Backend/URL.hs index 29dc8fefa..b40ff3959 100644 --- a/Backend/URL.hs +++ b/Backend/URL.hs @@ -11,7 +11,7 @@ import Control.Monad.State (liftIO) import Data.String.Utils import Types -import BackendTypes +import BackendClass import Utility import Messages diff --git a/Backend/WORM.hs b/Backend/WORM.hs index 324aee76b..a011995da 100644 --- a/Backend/WORM.hs +++ b/Backend/WORM.hs @@ -14,7 +14,7 @@ import System.Directory import Data.Maybe import qualified Backend.File -import BackendTypes +import BackendClass import Locations import qualified Annex import Content diff --git a/BackendTypes.hs b/BackendClass.hs index 48b208a9b..909ae8f96 100644 --- a/BackendTypes.hs +++ b/BackendClass.hs @@ -7,7 +7,7 @@ - Licensed under the GNU GPL version 3 or higher. -} -module BackendTypes where +module BackendClass where import Key diff --git a/Command.hs b/Command.hs index 38c63bd77..18b4a167a 100644 --- a/Command.hs +++ b/Command.hs @@ -17,7 +17,7 @@ import Data.List import Types import qualified Backend -import qualified BackendTypes +import qualified BackendClass import Messages import qualified Annex import qualified GitRepo as Git @@ -237,7 +237,7 @@ cmdlineKey = do backends <- Backend.list return $ stubKey { keyName = kname k, - keyBackendName = BackendTypes.name $ head backends + keyBackendName = BackendClass.name $ head backends } where kname Nothing = badkey diff --git a/Command/InAnnex.hs b/Command/InAnnex.hs index 4a4102754..a2beda4a5 100644 --- a/Command/InAnnex.hs +++ b/Command/InAnnex.hs @@ -13,7 +13,7 @@ import System.Exit import Command import Content import qualified Backend -import qualified BackendTypes +import qualified BackendClass import Key command :: [Command] @@ -28,7 +28,7 @@ start keyname = do backends <- Backend.list let key = stubKey { keyName = keyname, - keyBackendName = BackendTypes.name (head backends) + keyBackendName = BackendClass.name (head backends) } error "BROKEN. fixme!" present <- inAnnex key @@ -76,11 +76,10 @@ instance Arbitrary Key where arbitrary = do n <- arbitrary b <- elements ['A'..'Z'] - s <- arbitrary return $ Key { keyName = n, keyBackendName = [b], - keySize = s, + keySize = Nothing, keyMtime = Nothing } @@ -11,6 +11,6 @@ module Types ( Key ) where -import BackendTypes +import BackendClass import Annex import Key @@ -29,7 +29,7 @@ import qualified Backend import qualified GitRepo as Git import qualified Locations import qualified Utility -import qualified BackendTypes +import qualified BackendClass import qualified Types import qualified GitAnnex import qualified LocationLog @@ -120,8 +120,8 @@ test_add = "git-annex add" ~: TestList [basic, sha1dup] test_setkey :: Test test_setkey = "git-annex setkey/fromkey" ~: TestCase $ inmainrepo $ do writeFile tmp $ content sha1annexedfile - r <- annexeval $ BackendTypes.getKey backendSHA1 tmp - let sha1 = BackendTypes.keyName $ fromJust r + r <- annexeval $ BackendClass.getKey backendSHA1 tmp + let sha1 = Key.keyName $ fromJust r git_annex "setkey" ["-q", "--backend", "SHA1", "--key", sha1, tmp] @? "setkey failed" git_annex "fromkey" ["-q", "--backend", "SHA1", "--key", sha1, sha1annexedfile] @? "fromkey failed" Utility.boolSystem "git" [Utility.Params "commit -q -a -m commit"] @? "git commit failed" @@ -439,7 +439,7 @@ test_unused = "git-annex unused/dropunused" ~: intmpclonerepo $ do checkunused [annexedfilekey, sha1annexedfilekey] -- good opportunity to test dropkey also - git_annex "dropkey" ["-q", "--force", BackendTypes.keyName annexedfilekey] + git_annex "dropkey" ["-q", "--force", Key.keyName annexedfilekey] @? "dropkey failed" checkunused [sha1annexedfilekey] |