From cfe21e85e7fba61ac588e210f2a9b75f8d081f42 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Oct 2011 00:40:47 -0400 Subject: [PATCH] rename --- Branch.hs => Annex/Branch.hs | 6 +++--- CatFile.hs => Annex/CatFile.hs | 4 ++-- AnnexCommon.hs => Annex/Common.hs | 2 +- Content.hs => Annex/Content.hs | 12 ++++++------ Annex/Exception.hs | 2 +- AnnexQueue.hs => Annex/Queue.hs | 4 ++-- Version.hs => Annex/Version.hs | 4 ++-- Backend.hs | 2 +- Backend/SHA.hs | 4 ++-- Backend/URL.hs | 2 +- Backend/WORM.hs | 2 +- CmdLine.hs | 8 ++++---- Command.hs | 2 +- Command/Add.hs | 10 +++++----- Command/AddUrl.hs | 4 ++-- Command/ConfigList.hs | 2 +- Command/Describe.hs | 2 +- Command/Drop.hs | 4 ++-- Command/DropKey.hs | 4 ++-- Command/DropUnused.hs | 2 +- Command/Find.hs | 4 ++-- Command/Fix.hs | 8 ++++---- Command/FromKey.hs | 8 ++++---- Command/Fsck.hs | 4 ++-- Command/Get.hs | 4 ++-- Command/InAnnex.hs | 4 ++-- Command/Init.hs | 2 +- Command/InitRemote.hs | 2 +- Command/Lock.hs | 6 +++--- Command/Map.hs | 2 +- Command/Merge.hs | 6 +++--- Command/Migrate.hs | 4 ++-- Command/Move.hs | 4 ++-- Command/RecvKey.hs | 4 ++-- Command/Semitrust.hs | 2 +- Command/SendKey.hs | 4 ++-- Command/SetKey.hs | 4 ++-- Command/Status.hs | 4 ++-- Command/Trust.hs | 2 +- Command/Unannex.hs | 8 ++++---- Command/Uninit.hs | 8 ++++---- Command/Unlock.hs | 4 ++-- Command/Untrust.hs | 2 +- Command/Unused.hs | 10 +++++----- Command/Upgrade.hs | 4 ++-- Command/Version.hs | 4 ++-- Command/Whereis.hs | 2 +- Config.hs | 2 +- Crypto.hs | 2 +- GitAnnex.hs | 2 +- Init.hs | 10 +++++----- Limit.hs | 4 ++-- LocationLog.hs | 6 +++--- Options.hs | 2 +- PresenceLog.hs | 8 ++++---- Remote.hs | 2 +- Remote/Bup.hs | 2 +- Remote/Directory.hs | 2 +- Remote/Git.hs | 10 +++++----- Remote/Helper/Encryptable.hs | 2 +- Remote/Helper/Special.hs | 2 +- Remote/Hook.hs | 4 ++-- Remote/Rsync.hs | 4 ++-- Remote/S3real.hs | 4 ++-- Remote/Web.hs | 2 +- RemoteLog.hs | 8 ++++---- Trust.hs | 8 ++++---- UUID.hs | 8 ++++---- Upgrade.hs | 4 ++-- Upgrade/V0.hs | 4 ++-- Upgrade/V1.hs | 18 +++++++++--------- Upgrade/V2.hs | 22 +++++++++++----------- git-annex-shell.hs | 2 +- 73 files changed, 173 insertions(+), 173 deletions(-) rename Branch.hs => Annex/Branch.hs (99%) rename CatFile.hs => Annex/CatFile.hs (93%) rename AnnexCommon.hs => Annex/Common.hs (88%) rename Content.hs => Annex/Content.hs (97%) rename AnnexQueue.hs => Annex/Queue.hs (95%) rename Version.hs => Annex/Version.hs (95%) diff --git a/Branch.hs b/Annex/Branch.hs similarity index 99% rename from Branch.hs rename to Annex/Branch.hs index a2ddc70ac7..c6db9decaf 100644 --- a/Branch.hs +++ b/Annex/Branch.hs @@ -5,7 +5,7 @@ - Licensed under the GNU GPL version 3 or higher. -} -module Branch ( +module Annex.Branch ( create, update, get, @@ -22,13 +22,13 @@ import System.IO.Binary import System.Exit import qualified Data.ByteString.Lazy.Char8 as L -import AnnexCommon +import Annex.Common import Annex.Exception import Types.BranchState import qualified Git import qualified Git.UnionMerge import qualified Annex -import CatFile +import Annex.CatFile type GitRef = String diff --git a/CatFile.hs b/Annex/CatFile.hs similarity index 93% rename from CatFile.hs rename to Annex/CatFile.hs index 8762109e78..4f98815f8f 100644 --- a/CatFile.hs +++ b/Annex/CatFile.hs @@ -5,11 +5,11 @@ - Licensed under the GNU GPL version 3 or higher. -} -module CatFile ( +module Annex.CatFile ( catFile ) where -import AnnexCommon +import Annex.Common import qualified Git.CatFile import qualified Annex diff --git a/AnnexCommon.hs b/Annex/Common.hs similarity index 88% rename from AnnexCommon.hs rename to Annex/Common.hs index bcdc5e264e..ca7b1bff7e 100644 --- a/AnnexCommon.hs +++ b/Annex/Common.hs @@ -1,4 +1,4 @@ -module AnnexCommon ( +module Annex.Common ( module Common, module Types, module Annex, diff --git a/Content.hs b/Annex/Content.hs similarity index 97% rename from Content.hs rename to Annex/Content.hs index 567e4caa5d..a3fa79da85 100644 --- a/Content.hs +++ b/Annex/Content.hs @@ -5,7 +5,7 @@ - Licensed under the GNU GPL version 3 or higher. -} -module Content ( +module Annex.Content ( inAnnex, calcGitLink, logStatus, @@ -21,13 +21,13 @@ module Content ( saveState ) where -import AnnexCommon +import Annex.Common import LocationLog import UUID import qualified Git import qualified Annex -import qualified AnnexQueue -import qualified Branch +import qualified Annex.Queue +import qualified Annex.Branch import Utility.StatFS import Utility.FileMode import Types.Key @@ -233,5 +233,5 @@ getKeysPresent' dir = do {- Things to do to record changes to content. -} saveState :: Annex () saveState = do - AnnexQueue.flush False - Branch.commit "update" + Annex.Queue.flush False + Annex.Branch.commit "update" diff --git a/Annex/Exception.hs b/Annex/Exception.hs index 549ef4fd50..7ea8fb89a2 100644 --- a/Annex/Exception.hs +++ b/Annex/Exception.hs @@ -15,7 +15,7 @@ import Control.Exception.Control (handle) import Control.Monad.IO.Control (liftIOOp) import Control.Exception hiding (handle, throw) -import AnnexCommon +import Annex.Common {- Runs an Annex action, with setup and cleanup both in the IO monad. -} bracketIO :: IO c -> (c -> IO b) -> Annex a -> Annex a diff --git a/AnnexQueue.hs b/Annex/Queue.hs similarity index 95% rename from AnnexQueue.hs rename to Annex/Queue.hs index 66843a75e3..8d0a32bec9 100644 --- a/AnnexQueue.hs +++ b/Annex/Queue.hs @@ -5,13 +5,13 @@ - Licensed under the GNU GPL version 3 or higher. -} -module AnnexQueue ( +module Annex.Queue ( add, flush, flushWhenFull ) where -import AnnexCommon +import Annex.Common import Annex import qualified Git.Queue diff --git a/Version.hs b/Annex/Version.hs similarity index 95% rename from Version.hs rename to Annex/Version.hs index 304e9f0e18..e501dbf2ec 100644 --- a/Version.hs +++ b/Annex/Version.hs @@ -5,9 +5,9 @@ - Licensed under the GNU GPL version 3 or higher. -} -module Version where +module Annex.Version where -import AnnexCommon +import Annex.Common import qualified Git import Config diff --git a/Backend.hs b/Backend.hs index 94fe29607e..9a7df692cd 100644 --- a/Backend.hs +++ b/Backend.hs @@ -19,7 +19,7 @@ module Backend ( import System.IO.Error (try) import System.Posix.Files -import AnnexCommon +import Annex.Common import qualified Git import qualified Annex import Types.Key diff --git a/Backend/SHA.hs b/Backend/SHA.hs index 0c36ef0dc7..2be02c9f62 100644 --- a/Backend/SHA.hs +++ b/Backend/SHA.hs @@ -7,9 +7,9 @@ module Backend.SHA (backends) where -import AnnexCommon +import Annex.Common import qualified Annex -import Content +import Annex.Content import Types.Backend import Types.Key import qualified Build.SysConfig as SysConfig diff --git a/Backend/URL.hs b/Backend/URL.hs index 0745de455d..555e0617cf 100644 --- a/Backend/URL.hs +++ b/Backend/URL.hs @@ -10,7 +10,7 @@ module Backend.URL ( fromUrl ) where -import AnnexCommon +import Annex.Common import Types.Backend import Types.Key diff --git a/Backend/WORM.hs b/Backend/WORM.hs index 80c652558e..b45ec7b0c9 100644 --- a/Backend/WORM.hs +++ b/Backend/WORM.hs @@ -7,7 +7,7 @@ module Backend.WORM (backends) where -import AnnexCommon +import Annex.Common import Types.Backend import Types.Key diff --git a/CmdLine.hs b/CmdLine.hs index 34adb25569..faf5222a2a 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -14,11 +14,11 @@ module CmdLine ( import System.IO.Error (try) import System.Console.GetOpt -import AnnexCommon +import Annex.Common import qualified Annex -import qualified AnnexQueue +import qualified Annex.Queue import qualified Git -import Content +import Annex.Content import Command import Options import Init @@ -81,7 +81,7 @@ tryRun = tryRun' 0 tryRun' :: Integer -> Annex.AnnexState -> [Annex Bool] -> IO () tryRun' errnum state (a:as) = do result <- try $ Annex.run state $ do - AnnexQueue.flushWhenFull + Annex.Queue.flushWhenFull a case result of Left err -> do diff --git a/Command.hs b/Command.hs index 20f3d79b62..1f418b870b 100644 --- a/Command.hs +++ b/Command.hs @@ -7,7 +7,7 @@ module Command where -import AnnexCommon +import Annex.Common import qualified Backend import qualified Annex import qualified Git diff --git a/Command/Add.hs b/Command/Add.hs index 299b5f36e0..70b38e809a 100644 --- a/Command/Add.hs +++ b/Command/Add.hs @@ -7,14 +7,14 @@ module Command.Add where -import AnnexCommon +import Annex.Common import Annex.Exception import Command import qualified Annex -import qualified AnnexQueue +import qualified Annex.Queue import qualified Backend import LocationLog -import Content +import Annex.Content import Utility.Touch import Backend @@ -81,6 +81,6 @@ cleanup file key hascontent = do force <- Annex.getState Annex.force if force - then AnnexQueue.add "add" [Param "-f", Param "--"] [file] - else AnnexQueue.add "add" [Param "--"] [file] + then Annex.Queue.add "add" [Param "-f", Param "--"] [file] + else Annex.Queue.add "add" [Param "--"] [file] return True diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs index ce6e70699c..35f85ca26f 100644 --- a/Command/AddUrl.hs +++ b/Command/AddUrl.hs @@ -9,7 +9,7 @@ module Command.AddUrl where import Network.URI -import AnnexCommon +import Annex.Common import Command import qualified Backend import qualified Utility.Url as Url @@ -17,7 +17,7 @@ import qualified Remote.Web import qualified Command.Add import qualified Annex import qualified Backend.URL -import Content +import Annex.Content import PresenceLog command :: [Command] diff --git a/Command/ConfigList.hs b/Command/ConfigList.hs index c38539fa0b..443656f174 100644 --- a/Command/ConfigList.hs +++ b/Command/ConfigList.hs @@ -7,7 +7,7 @@ module Command.ConfigList where -import AnnexCommon +import Annex.Common import Command import UUID diff --git a/Command/Describe.hs b/Command/Describe.hs index b1c144872b..48f74dcd87 100644 --- a/Command/Describe.hs +++ b/Command/Describe.hs @@ -7,7 +7,7 @@ module Command.Describe where -import AnnexCommon +import Annex.Common import Command import qualified Remote import UUID diff --git a/Command/Drop.hs b/Command/Drop.hs index 7210184f88..45feab2f32 100644 --- a/Command/Drop.hs +++ b/Command/Drop.hs @@ -7,12 +7,12 @@ module Command.Drop where -import AnnexCommon +import Annex.Common import Command import qualified Remote import qualified Annex import LocationLog -import Content +import Annex.Content import Trust import Config diff --git a/Command/DropKey.hs b/Command/DropKey.hs index 7ead1c4bca..185041ad09 100644 --- a/Command/DropKey.hs +++ b/Command/DropKey.hs @@ -7,11 +7,11 @@ module Command.DropKey where -import AnnexCommon +import Annex.Common import Command import qualified Annex import LocationLog -import Content +import Annex.Content command :: [Command] command = [repoCommand "dropkey" (paramRepeating paramKey) seek diff --git a/Command/DropUnused.hs b/Command/DropUnused.hs index ed4f71e7e4..c4d9b765e3 100644 --- a/Command/DropUnused.hs +++ b/Command/DropUnused.hs @@ -9,7 +9,7 @@ module Command.DropUnused where import qualified Data.Map as M -import AnnexCommon +import Annex.Common import Command import qualified Annex import qualified Command.Drop diff --git a/Command/Find.hs b/Command/Find.hs index 8d80659d0d..b8c9eeec27 100644 --- a/Command/Find.hs +++ b/Command/Find.hs @@ -7,9 +7,9 @@ module Command.Find where -import AnnexCommon +import Annex.Common import Command -import Content +import Annex.Content import Limit command :: [Command] diff --git a/Command/Fix.hs b/Command/Fix.hs index a66a1c44a7..44e36009b6 100644 --- a/Command/Fix.hs +++ b/Command/Fix.hs @@ -7,10 +7,10 @@ module Command.Fix where -import AnnexCommon +import Annex.Common import Command -import qualified AnnexQueue -import Content +import qualified Annex.Queue +import Annex.Content command :: [Command] command = [repoCommand "fix" paramPaths seek @@ -39,5 +39,5 @@ perform file link = do cleanup :: FilePath -> CommandCleanup cleanup file = do - AnnexQueue.add "add" [Param "--"] [file] + Annex.Queue.add "add" [Param "--"] [file] return True diff --git a/Command/FromKey.hs b/Command/FromKey.hs index e60025bf7e..f4dceb3315 100644 --- a/Command/FromKey.hs +++ b/Command/FromKey.hs @@ -7,10 +7,10 @@ module Command.FromKey where -import AnnexCommon +import Annex.Common import Command -import qualified AnnexQueue -import Content +import qualified Annex.Queue +import Annex.Content import Types.Key command :: [Command] @@ -39,5 +39,5 @@ perform file = do cleanup :: FilePath -> CommandCleanup cleanup file = do - AnnexQueue.add "add" [Param "--"] [file] + Annex.Queue.add "add" [Param "--"] [file] return True diff --git a/Command/Fsck.hs b/Command/Fsck.hs index 33a8405a69..0a75003207 100644 --- a/Command/Fsck.hs +++ b/Command/Fsck.hs @@ -7,13 +7,13 @@ module Command.Fsck where -import AnnexCommon +import Annex.Common import Command import qualified Remote import qualified Types.Backend import qualified Types.Key import UUID -import Content +import Annex.Content import LocationLog import Trust import Utility.DataUnits diff --git a/Command/Get.hs b/Command/Get.hs index 34f56aa2d5..c9fdf56530 100644 --- a/Command/Get.hs +++ b/Command/Get.hs @@ -7,11 +7,11 @@ module Command.Get where -import AnnexCommon +import Annex.Common import Command import qualified Annex import qualified Remote -import Content +import Annex.Content import qualified Command.Move command :: [Command] diff --git a/Command/InAnnex.hs b/Command/InAnnex.hs index 36b6d40e6e..05544366ba 100644 --- a/Command/InAnnex.hs +++ b/Command/InAnnex.hs @@ -7,9 +7,9 @@ module Command.InAnnex where -import AnnexCommon +import Annex.Common import Command -import Content +import Annex.Content command :: [Command] command = [repoCommand "inannex" (paramRepeating paramKey) seek diff --git a/Command/Init.hs b/Command/Init.hs index f3d8834ba1..1a306ae963 100644 --- a/Command/Init.hs +++ b/Command/Init.hs @@ -7,7 +7,7 @@ module Command.Init where -import AnnexCommon +import Annex.Common import Command import UUID import Init diff --git a/Command/InitRemote.hs b/Command/InitRemote.hs index 2ce86e9c6b..5080b7b2b8 100644 --- a/Command/InitRemote.hs +++ b/Command/InitRemote.hs @@ -9,7 +9,7 @@ module Command.InitRemote where import qualified Data.Map as M -import AnnexCommon +import Annex.Common import Command import qualified Remote import qualified RemoteLog diff --git a/Command/Lock.hs b/Command/Lock.hs index af7b92ad68..9acc5fe4aa 100644 --- a/Command/Lock.hs +++ b/Command/Lock.hs @@ -7,9 +7,9 @@ module Command.Lock where -import AnnexCommon +import Annex.Common import Command -import qualified AnnexQueue +import qualified Annex.Queue import Backend command :: [Command] @@ -30,5 +30,5 @@ perform file = do -- Checkout from HEAD to get rid of any changes that might be -- staged in the index, and get back to the previous symlink to -- the content. - AnnexQueue.add "checkout" [Param "HEAD", Param "--"] [file] + Annex.Queue.add "checkout" [Param "HEAD", Param "--"] [file] next $ return True -- no cleanup needed diff --git a/Command/Map.hs b/Command/Map.hs index 8e63f6dd6a..39737289ca 100644 --- a/Command/Map.hs +++ b/Command/Map.hs @@ -10,7 +10,7 @@ module Command.Map where import Control.Exception.Extensible import qualified Data.Map as M -import AnnexCommon +import Annex.Common import Command import qualified Git import UUID diff --git a/Command/Merge.hs b/Command/Merge.hs index b365e0e0cd..1de1eb6eeb 100644 --- a/Command/Merge.hs +++ b/Command/Merge.hs @@ -7,9 +7,9 @@ module Command.Merge where -import AnnexCommon +import Annex.Common import Command -import qualified Branch +import qualified Annex.Branch command :: [Command] command = [repoCommand "merge" paramNothing seek @@ -25,5 +25,5 @@ start = do perform :: CommandPerform perform = do - Branch.update + Annex.Branch.update next $ return True diff --git a/Command/Migrate.hs b/Command/Migrate.hs index 24f23baf5c..a9591a81a9 100644 --- a/Command/Migrate.hs +++ b/Command/Migrate.hs @@ -7,11 +7,11 @@ module Command.Migrate where -import AnnexCommon +import Annex.Common import Command import qualified Backend import qualified Types.Key -import Content +import Annex.Content import qualified Command.Add import Backend diff --git a/Command/Move.hs b/Command/Move.hs index d2870b1e42..06d58d602e 100644 --- a/Command/Move.hs +++ b/Command/Move.hs @@ -7,12 +7,12 @@ module Command.Move where -import AnnexCommon +import Annex.Common import Command import qualified Command.Drop import qualified Annex import LocationLog -import Content +import Annex.Content import qualified Remote import UUID diff --git a/Command/RecvKey.hs b/Command/RecvKey.hs index 400e81102b..babe04cd01 100644 --- a/Command/RecvKey.hs +++ b/Command/RecvKey.hs @@ -7,10 +7,10 @@ module Command.RecvKey where -import AnnexCommon +import Annex.Common import Command import CmdLine -import Content +import Annex.Content import Utility.RsyncFile command :: [Command] diff --git a/Command/Semitrust.hs b/Command/Semitrust.hs index 236ba28794..31b44bc59d 100644 --- a/Command/Semitrust.hs +++ b/Command/Semitrust.hs @@ -7,7 +7,7 @@ module Command.Semitrust where -import AnnexCommon +import Annex.Common import Command import qualified Remote import UUID diff --git a/Command/SendKey.hs b/Command/SendKey.hs index f397d9ae6a..f3db996637 100644 --- a/Command/SendKey.hs +++ b/Command/SendKey.hs @@ -7,9 +7,9 @@ module Command.SendKey where -import AnnexCommon +import Annex.Common import Command -import Content +import Annex.Content import Utility.RsyncFile command :: [Command] diff --git a/Command/SetKey.hs b/Command/SetKey.hs index 12ef5b74a5..dde1ec12ad 100644 --- a/Command/SetKey.hs +++ b/Command/SetKey.hs @@ -7,10 +7,10 @@ module Command.SetKey where -import AnnexCommon +import Annex.Common import Command import LocationLog -import Content +import Annex.Content command :: [Command] command = [repoCommand "setkey" paramPath seek diff --git a/Command/Status.hs b/Command/Status.hs index de49f84d5a..edb74166d0 100644 --- a/Command/Status.hs +++ b/Command/Status.hs @@ -12,7 +12,7 @@ import qualified Data.Map as M import qualified Data.Set as S import Data.Set (Set) -import AnnexCommon +import Annex.Common import qualified Types.Backend as B import qualified Types.Remote as R import qualified Remote @@ -20,7 +20,7 @@ import qualified Command.Unused import qualified Git import Command import Utility.DataUnits -import Content +import Annex.Content import Types.Key import Backend import UUID diff --git a/Command/Trust.hs b/Command/Trust.hs index 04c68a5d32..3c3473e219 100644 --- a/Command/Trust.hs +++ b/Command/Trust.hs @@ -7,7 +7,7 @@ module Command.Trust where -import AnnexCommon +import Annex.Common import Command import qualified Remote import Trust diff --git a/Command/Unannex.hs b/Command/Unannex.hs index c5c5e90a67..9413cb88c2 100644 --- a/Command/Unannex.hs +++ b/Command/Unannex.hs @@ -7,14 +7,14 @@ module Command.Unannex where -import AnnexCommon +import Annex.Common import Command import qualified Command.Drop import qualified Annex -import qualified AnnexQueue +import qualified Annex.Queue import Utility.FileMode import LocationLog -import Content +import Annex.Content import qualified Git import qualified Git.LsFiles as LsFiles @@ -71,6 +71,6 @@ cleanup file key = do -- Commit staged changes at end to avoid confusing the -- pre-commit hook if this file is later added back to -- git as a normal, non-annexed file. - AnnexQueue.add "commit" [Param "-m", Param "content removed from git annex"] [] + Annex.Queue.add "commit" [Param "-m", Param "content removed from git annex"] [] return True diff --git a/Command/Uninit.hs b/Command/Uninit.hs index 3ba7a7cf33..c5afe30f23 100644 --- a/Command/Uninit.hs +++ b/Command/Uninit.hs @@ -7,14 +7,14 @@ module Command.Uninit where -import AnnexCommon +import Annex.Common import Command import qualified Git import qualified Annex import qualified Command.Unannex import Init -import qualified Branch -import Content +import qualified Annex.Branch +import Annex.Content command :: [Command] command = [repoCommand "uninit" paramPaths seek @@ -46,5 +46,5 @@ cleanup = do -- avoid normal shutdown saveState liftIO $ do - Git.run g "branch" [Param "-D", Param Branch.name] + Git.run g "branch" [Param "-D", Param Annex.Branch.name] exitSuccess diff --git a/Command/Unlock.hs b/Command/Unlock.hs index 220d57829b..b2e4aa09a5 100644 --- a/Command/Unlock.hs +++ b/Command/Unlock.hs @@ -7,9 +7,9 @@ module Command.Unlock where -import AnnexCommon +import Annex.Common import Command -import Content +import Annex.Content import Utility.CopyFile import Utility.FileMode diff --git a/Command/Untrust.hs b/Command/Untrust.hs index 30ade85ce0..b8a107d901 100644 --- a/Command/Untrust.hs +++ b/Command/Untrust.hs @@ -7,7 +7,7 @@ module Command.Untrust where -import AnnexCommon +import Annex.Common import Command import qualified Remote import UUID diff --git a/Command/Unused.hs b/Command/Unused.hs index 1ba4f53019..6681fca3c7 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -12,9 +12,9 @@ module Command.Unused where import qualified Data.Set as S import qualified Data.ByteString.Lazy.Char8 as L -import AnnexCommon +import Annex.Common import Command -import Content +import Annex.Content import Utility.FileMode import LocationLog import qualified Annex @@ -23,8 +23,8 @@ import qualified Git.LsFiles as LsFiles import qualified Git.LsTree as LsTree import qualified Backend import qualified Remote -import qualified Branch -import CatFile +import qualified Annex.Branch +import Annex.CatFile command :: [Command] command = [repoCommand "unused" paramNothing seek @@ -165,7 +165,7 @@ excludeReferenced l = do filter ourbranches . map words . lines . L.unpack cmpheads a b = head a == head b - ourbranchend = '/' : Branch.name + ourbranchend = '/' : Annex.Branch.name ourbranches ws = not $ ourbranchend `isSuffixOf` last ws removewith [] s = return $ S.toList s removewith (a:as) s diff --git a/Command/Upgrade.hs b/Command/Upgrade.hs index d79f895d8d..7b6b127a5e 100644 --- a/Command/Upgrade.hs +++ b/Command/Upgrade.hs @@ -7,10 +7,10 @@ module Command.Upgrade where -import AnnexCommon +import Annex.Common import Command import Upgrade -import Version +import Annex.Version command :: [Command] command = [standaloneCommand "upgrade" paramNothing seek diff --git a/Command/Version.hs b/Command/Version.hs index 1e44fbb0b1..bc895b1945 100644 --- a/Command/Version.hs +++ b/Command/Version.hs @@ -7,10 +7,10 @@ module Command.Version where -import AnnexCommon +import Annex.Common import Command import qualified Build.SysConfig as SysConfig -import Version +import Annex.Version command :: [Command] command = [standaloneCommand "version" paramNothing seek "show version info"] diff --git a/Command/Whereis.hs b/Command/Whereis.hs index 3fb636c04c..fec41f410c 100644 --- a/Command/Whereis.hs +++ b/Command/Whereis.hs @@ -7,7 +7,7 @@ module Command.Whereis where -import AnnexCommon +import Annex.Common import LocationLog import Command import Remote diff --git a/Config.hs b/Config.hs index c0328794e1..80637c3933 100644 --- a/Config.hs +++ b/Config.hs @@ -7,7 +7,7 @@ module Config where -import AnnexCommon +import Annex.Common import qualified Git import qualified Annex diff --git a/Crypto.hs b/Crypto.hs index 4cc16b4242..af0a216d7d 100644 --- a/Crypto.hs +++ b/Crypto.hs @@ -37,7 +37,7 @@ import Control.Exception (finally) import System.Exit import System.Environment -import AnnexCommon +import Annex.Common import Types.Key import Types.Remote import Utility.Base64 diff --git a/GitAnnex.hs b/GitAnnex.hs index fcfbf44b4b..9814880792 100644 --- a/GitAnnex.hs +++ b/GitAnnex.hs @@ -9,7 +9,7 @@ module GitAnnex where import System.Console.GetOpt -import AnnexCommon +import Annex.Common import qualified Git import CmdLine import Command diff --git a/Init.hs b/Init.hs index 57eaf39d20..fa4598966b 100644 --- a/Init.hs +++ b/Init.hs @@ -11,16 +11,16 @@ module Init ( uninitialize ) where -import AnnexCommon +import Annex.Common import qualified Git -import qualified Branch -import Version +import qualified Annex.Branch +import Annex.Version import UUID initialize :: Annex () initialize = do prepUUID - Branch.create + Annex.Branch.create setVersion gitPreCommitHookWrite @@ -35,7 +35,7 @@ ensureInitialized :: Annex () ensureInitialized = getVersion >>= maybe needsinit checkVersion where needsinit = do - annexed <- Branch.hasSomeBranch + annexed <- Annex.Branch.hasSomeBranch if annexed then initialize else error "First run: git-annex init" diff --git a/Limit.hs b/Limit.hs index 334ae325d6..91857c687d 100644 --- a/Limit.hs +++ b/Limit.hs @@ -10,13 +10,13 @@ module Limit where import Text.Regex.PCRE.Light.Char8 import System.Path.WildMatch -import AnnexCommon +import Annex.Common import qualified Annex import qualified Utility.Matcher import qualified Remote import qualified Backend import LocationLog -import Content +import Annex.Content type Limit = Utility.Matcher.Token (FilePath -> Annex Bool) diff --git a/LocationLog.hs b/LocationLog.hs index 759bee830e..a633f26374 100644 --- a/LocationLog.hs +++ b/LocationLog.hs @@ -21,9 +21,9 @@ module LocationLog ( logFileKey ) where -import AnnexCommon +import Annex.Common import qualified Git -import qualified Branch +import qualified Annex.Branch import UUID import PresenceLog @@ -43,7 +43,7 @@ keyLocations = currentLog . logFile {- Finds all keys that have location log information. - (There may be duplicate keys in the list.) -} loggedKeys :: Annex [Key] -loggedKeys = mapMaybe (logFileKey . takeFileName) <$> Branch.files +loggedKeys = mapMaybe (logFileKey . takeFileName) <$> Annex.Branch.files {- The filename of the log file for a given key. -} logFile :: Key -> String diff --git a/Options.hs b/Options.hs index 9d60292002..9f573ef5dc 100644 --- a/Options.hs +++ b/Options.hs @@ -10,7 +10,7 @@ module Options where import System.Console.GetOpt import System.Log.Logger -import AnnexCommon +import Annex.Common import qualified Annex import Command import Limit diff --git a/PresenceLog.hs b/PresenceLog.hs index 23c2882571..01c1ad0943 100644 --- a/PresenceLog.hs +++ b/PresenceLog.hs @@ -27,8 +27,8 @@ import Data.Time import System.Locale import qualified Data.Map as M -import AnnexCommon -import qualified Branch +import Annex.Common +import qualified Annex.Branch data LogLine = LogLine { date :: POSIXTime, @@ -72,13 +72,13 @@ instance Read LogLine where ret v = [(v, "")] addLog :: FilePath -> LogLine -> Annex () -addLog file line = Branch.change file $ \s -> +addLog file line = Annex.Branch.change file $ \s -> showLog $ compactLog (line : parseLog s) {- Reads a log file. - Note that the LogLines returned may be in any order. -} readLog :: FilePath -> Annex [LogLine] -readLog file = parseLog <$> Branch.get file +readLog file = parseLog <$> Annex.Branch.get file parseLog :: String -> [LogLine] parseLog = filter parsable . map read . lines diff --git a/Remote.hs b/Remote.hs index 2371b7bf2d..86fda270e1 100644 --- a/Remote.hs +++ b/Remote.hs @@ -32,7 +32,7 @@ import qualified Data.Map as M import Text.JSON import Text.JSON.Generic -import AnnexCommon +import Annex.Common import Types.Remote import UUID import qualified Annex diff --git a/Remote/Bup.hs b/Remote/Bup.hs index 9588310194..2d0ba47423 100644 --- a/Remote/Bup.hs +++ b/Remote/Bup.hs @@ -12,7 +12,7 @@ import System.IO.Error import qualified Data.Map as M import System.Process -import AnnexCommon +import Annex.Common import Types.Remote import qualified Git import UUID diff --git a/Remote/Directory.hs b/Remote/Directory.hs index 664f8ca5fe..bfea850e52 100644 --- a/Remote/Directory.hs +++ b/Remote/Directory.hs @@ -11,7 +11,7 @@ import qualified Data.ByteString.Lazy.Char8 as L import System.IO.Error import qualified Data.Map as M -import AnnexCommon +import Annex.Common import Utility.CopyFile import Types.Remote import qualified Git diff --git a/Remote/Git.hs b/Remote/Git.hs index a457c5905d..15e8991f54 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -10,7 +10,7 @@ module Remote.Git (remote) where import Control.Exception.Extensible import qualified Data.Map as M -import AnnexCommon +import Annex.Common import Utility.CopyFile import Utility.RsyncFile import Utility.Ssh @@ -18,7 +18,7 @@ import Types.Remote import qualified Git import qualified Annex import UUID -import qualified Content +import qualified Annex.Content import qualified Utility.Url as Url import Config import Init @@ -121,7 +121,7 @@ inAnnex r key | Git.repoIsUrl r = checkremote | otherwise = safely checklocal where - checklocal = onLocal r (Content.inAnnex key) + checklocal = onLocal r (Annex.Content.inAnnex key) checkremote = do showAction $ "checking " ++ Git.repoDescribe r inannex <- onRemote r (boolSystem, False) "inannex" @@ -164,9 +164,9 @@ copyToRemote r key let keysrc = gitAnnexLocation g key -- run copy from perspective of remote liftIO $ onLocal r $ do - ok <- Content.getViaTmp key $ + ok <- Annex.Content.getViaTmp key $ rsyncOrCopyFile r keysrc - Content.saveState + Annex.Content.saveState return ok | Git.repoIsSsh r = do g <- gitRepo diff --git a/Remote/Helper/Encryptable.hs b/Remote/Helper/Encryptable.hs index 42503e4d41..6f43b4367c 100644 --- a/Remote/Helper/Encryptable.hs +++ b/Remote/Helper/Encryptable.hs @@ -9,7 +9,7 @@ module Remote.Helper.Encryptable where import qualified Data.Map as M -import AnnexCommon +import Annex.Common import Types.Remote import Crypto import qualified Annex diff --git a/Remote/Helper/Special.hs b/Remote/Helper/Special.hs index 905db04c55..c4e0b7f07f 100644 --- a/Remote/Helper/Special.hs +++ b/Remote/Helper/Special.hs @@ -9,7 +9,7 @@ module Remote.Helper.Special where import qualified Data.Map as M -import AnnexCommon +import Annex.Common import Types.Remote import qualified Git import UUID diff --git a/Remote/Hook.hs b/Remote/Hook.hs index 3bbda19240..a18bc51e66 100644 --- a/Remote/Hook.hs +++ b/Remote/Hook.hs @@ -12,12 +12,12 @@ import qualified Data.Map as M import System.IO.Error (try) import System.Exit -import AnnexCommon +import Annex.Common import Types.Remote import qualified Git import UUID import Config -import Content +import Annex.Content import Remote.Helper.Special import Remote.Helper.Encryptable import Crypto diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs index 6a1c297c5d..9b870f2b10 100644 --- a/Remote/Rsync.hs +++ b/Remote/Rsync.hs @@ -10,12 +10,12 @@ module Remote.Rsync (remote) where import qualified Data.ByteString.Lazy.Char8 as L import qualified Data.Map as M -import AnnexCommon +import Annex.Common import Types.Remote import qualified Git import UUID import Config -import Content +import Annex.Content import Remote.Helper.Special import Remote.Helper.Encryptable import Crypto diff --git a/Remote/S3real.hs b/Remote/S3real.hs index b2ea4b0c86..c846390b8e 100644 --- a/Remote/S3real.hs +++ b/Remote/S3real.hs @@ -17,7 +17,7 @@ import Data.Char import System.Environment import System.Posix.Env (setEnv) -import AnnexCommon +import Annex.Common import Types.Remote import Types.Key import qualified Git @@ -26,7 +26,7 @@ import Config import Remote.Helper.Special import Remote.Helper.Encryptable import Crypto -import Content +import Annex.Content import Utility.Base64 remote :: RemoteType Annex diff --git a/Remote/Web.hs b/Remote/Web.hs index 732f4d46c0..9132967c7e 100644 --- a/Remote/Web.hs +++ b/Remote/Web.hs @@ -10,7 +10,7 @@ module Remote.Web ( setUrl ) where -import AnnexCommon +import Annex.Common import Types.Remote import qualified Git import UUID diff --git a/RemoteLog.hs b/RemoteLog.hs index 2e43265f5c..4ffe712050 100644 --- a/RemoteLog.hs +++ b/RemoteLog.hs @@ -18,8 +18,8 @@ module RemoteLog ( import qualified Data.Map as M import Data.Char -import AnnexCommon -import qualified Branch +import Annex.Common +import qualified Annex.Branch import Types.Remote import UUID @@ -29,7 +29,7 @@ remoteLog = "remote.log" {- Adds or updates a remote's config in the log. -} configSet :: UUID -> RemoteConfig -> Annex () -configSet u c = Branch.change remoteLog $ +configSet u c = Annex.Branch.change remoteLog $ serialize . M.insert u c . remoteLogParse where serialize = unlines . sort . map toline . M.toList @@ -37,7 +37,7 @@ configSet u c = Branch.change remoteLog $ {- Map of remotes by uuid containing key/value config maps. -} readRemoteLog :: Annex (M.Map UUID RemoteConfig) -readRemoteLog = remoteLogParse <$> Branch.get remoteLog +readRemoteLog = remoteLogParse <$> Annex.Branch.get remoteLog remoteLogParse :: String -> M.Map UUID RemoteConfig remoteLogParse s = diff --git a/Trust.hs b/Trust.hs index 13f0354bd3..5f76003813 100644 --- a/Trust.hs +++ b/Trust.hs @@ -15,9 +15,9 @@ module Trust ( import qualified Data.Map as M -import AnnexCommon +import Annex.Common import Types.TrustLevel -import qualified Branch +import qualified Annex.Branch import UUID import qualified Annex @@ -40,7 +40,7 @@ trustMap = do Just m -> return m Nothing -> do overrides <- Annex.getState Annex.forcetrust - l <- Branch.get trustLog + l <- Annex.Branch.get trustLog let m = M.fromList $ trustMapParse l ++ overrides Annex.changeState $ \s -> s { Annex.trustmap = Just m } return m @@ -62,7 +62,7 @@ trustSet :: UUID -> TrustLevel -> Annex () trustSet uuid level = do when (null uuid) $ error "unknown UUID; cannot modify trust level" - Branch.change trustLog $ + Annex.Branch.change trustLog $ serialize . M.insert uuid level . M.fromList . trustMapParse Annex.changeState $ \s -> s { Annex.trustmap = Nothing } where diff --git a/UUID.hs b/UUID.hs index 633938be48..208866ad72 100644 --- a/UUID.hs +++ b/UUID.hs @@ -24,9 +24,9 @@ module UUID ( import qualified Data.Map as M -import AnnexCommon +import Annex.Common import qualified Git -import qualified Branch +import qualified Annex.Branch import Types.UUID import qualified Build.SysConfig as SysConfig import Config @@ -82,14 +82,14 @@ prepUUID = do {- Records a description for a uuid in the uuidLog. -} describeUUID :: UUID -> String -> Annex () -describeUUID uuid desc = Branch.change uuidLog $ +describeUUID uuid desc = Annex.Branch.change uuidLog $ serialize . M.insert uuid desc . parse where serialize m = unlines $ map (\(u, d) -> u++" "++d) $ M.toList m {- Read the uuidLog into a Map -} uuidMap :: Annex (M.Map UUID String) -uuidMap = parse <$> Branch.get uuidLog +uuidMap = parse <$> Annex.Branch.get uuidLog parse :: String -> M.Map UUID String parse = M.fromList . map pair . lines diff --git a/Upgrade.hs b/Upgrade.hs index 666f8d08a7..6f1da773dc 100644 --- a/Upgrade.hs +++ b/Upgrade.hs @@ -7,8 +7,8 @@ module Upgrade where -import AnnexCommon -import Version +import Annex.Common +import Annex.Version import qualified Upgrade.V0 import qualified Upgrade.V1 import qualified Upgrade.V2 diff --git a/Upgrade/V0.hs b/Upgrade/V0.hs index f8e6cda56f..af91741a0c 100644 --- a/Upgrade/V0.hs +++ b/Upgrade/V0.hs @@ -9,8 +9,8 @@ module Upgrade.V0 where import System.IO.Error (try) -import AnnexCommon -import Content +import Annex.Common +import Annex.Content import qualified Upgrade.V1 upgrade :: Annex Bool diff --git a/Upgrade/V1.hs b/Upgrade/V1.hs index bc50b857c6..f4e44acdcb 100644 --- a/Upgrade/V1.hs +++ b/Upgrade/V1.hs @@ -11,15 +11,15 @@ import System.IO.Error (try) import System.Posix.Types import Data.Char -import AnnexCommon +import Annex.Common import Types.Key -import Content +import Annex.Content import PresenceLog -import qualified AnnexQueue +import qualified Annex.Queue import qualified Git import qualified Git.LsFiles as LsFiles import Backend -import Version +import Annex.Version import Utility.FileMode import qualified Upgrade.V2 @@ -60,7 +60,7 @@ upgrade = do updateSymlinks moveLocationLogs - AnnexQueue.flush True + Annex.Queue.flush True setVersion Upgrade.V2.upgrade @@ -94,7 +94,7 @@ updateSymlinks = do link <- calcGitLink f k liftIO $ removeFile f liftIO $ createSymbolicLink link f - AnnexQueue.add "add" [Param "--"] [f] + Annex.Queue.add "add" [Param "--"] [f] moveLocationLogs :: Annex () moveLocationLogs = do @@ -124,9 +124,9 @@ moveLocationLogs = do old <- liftIO $ readLog1 f new <- liftIO $ readLog1 dest liftIO $ writeLog1 dest (old++new) - AnnexQueue.add "add" [Param "--"] [dest] - AnnexQueue.add "add" [Param "--"] [f] - AnnexQueue.add "rm" [Param "--quiet", Param "-f", Param "--"] [f] + Annex.Queue.add "add" [Param "--"] [dest] + Annex.Queue.add "add" [Param "--"] [f] + Annex.Queue.add "rm" [Param "--quiet", Param "-f", Param "--"] [f] oldlog2key :: FilePath -> Maybe (FilePath, Key) oldlog2key l = diff --git a/Upgrade/V2.hs b/Upgrade/V2.hs index 922dfff28f..8ac26dc525 100644 --- a/Upgrade/V2.hs +++ b/Upgrade/V2.hs @@ -7,11 +7,11 @@ module Upgrade.V2 where -import AnnexCommon +import Annex.Common import qualified Git -import qualified Branch +import qualified Annex.Branch import LocationLog -import Content +import Annex.Content olddir :: Git.Repo -> FilePath olddir g @@ -39,7 +39,7 @@ upgrade = do g <- gitRepo let bare = Git.repoIsLocalBare g - Branch.create + Annex.Branch.create showProgress e <- liftIO $ doesDirectoryExist (olddir g) @@ -75,7 +75,7 @@ inject :: FilePath -> FilePath -> Annex () inject source dest = do g <- gitRepo new <- liftIO (readFile $ olddir g source) - Branch.change dest $ \prev -> + Annex.Branch.change dest $ \prev -> unlines $ nub $ lines prev ++ lines new showProgress @@ -85,8 +85,8 @@ logFiles dir = return . filter (".log" `isSuffixOf`) push :: Annex () push = do - origin_master <- Branch.refExists "origin/master" - origin_gitannex <- Branch.hasOrigin + origin_master <- Annex.Branch.refExists "origin/master" + origin_gitannex <- Annex.Branch.hasOrigin case (origin_master, origin_gitannex) of (_, True) -> do -- Merge in the origin's git-annex branch, @@ -94,20 +94,20 @@ push = do -- will immediately work. Not pushed here, -- because it's less obnoxious to let the user -- push. - Branch.update + Annex.Branch.update (True, False) -> do -- push git-annex to origin, so that -- "git push" will from then on -- automatically push it - Branch.update -- just in case + Annex.Branch.update -- just in case showAction "pushing new git-annex branch to origin" showOutput g <- gitRepo - liftIO $ Git.run g "push" [Param "origin", Param Branch.name] + liftIO $ Git.run g "push" [Param "origin", Param Annex.Branch.name] _ -> do -- no origin exists, so just let the user -- know about the new branch - Branch.update + Annex.Branch.update showLongNote $ "git-annex branch created\n" ++ "Be sure to push this branch when pushing to remotes.\n" diff --git a/git-annex-shell.hs b/git-annex-shell.hs index 6147545ab6..d03b0910ea 100644 --- a/git-annex-shell.hs +++ b/git-annex-shell.hs @@ -7,7 +7,7 @@ import System.Environment -import AnnexCommon +import Annex.Common import qualified Git import CmdLine import Command