aboutsummaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/Add.hs5
-rw-r--r--Command/AddUnused.hs2
-rw-r--r--Command/AddUrl.hs3
-rw-r--r--Command/Assistant.hs1
-rw-r--r--Command/CheckPresentKey.hs2
-rw-r--r--Command/Commit.hs1
-rw-r--r--Command/ConfigList.hs1
-rw-r--r--Command/ContentLocation.hs3
-rw-r--r--Command/Copy.hs1
-rw-r--r--Command/Dead.hs2
-rw-r--r--Command/Describe.hs1
-rw-r--r--Command/DiffDriver.hs1
-rw-r--r--Command/Direct.hs1
-rw-r--r--Command/Drop.hs1
-rw-r--r--Command/DropKey.hs1
-rw-r--r--Command/DropUnused.hs1
-rw-r--r--Command/EnableRemote.hs1
-rw-r--r--Command/ExamineKey.hs3
-rw-r--r--Command/Expire.hs1
-rw-r--r--Command/Find.hs3
-rw-r--r--Command/FindRef.hs1
-rw-r--r--Command/Fix.hs1
-rw-r--r--Command/Forget.hs1
-rw-r--r--Command/FromKey.hs2
-rw-r--r--Command/Fsck.hs7
-rw-r--r--Command/FuzzTest.hs3
-rw-r--r--Command/GCryptSetup.hs1
-rw-r--r--Command/Get.hs1
-rw-r--r--Command/Group.hs1
-rw-r--r--Command/GroupWanted.hs1
-rw-r--r--Command/Help.hs1
-rw-r--r--Command/Import.hs2
-rw-r--r--Command/ImportFeed.hs3
-rw-r--r--Command/InAnnex.hs1
-rw-r--r--Command/Indirect.hs1
-rw-r--r--Command/Info.hs5
-rw-r--r--Command/Init.hs1
-rw-r--r--Command/InitRemote.hs3
-rw-r--r--Command/List.hs1
-rw-r--r--Command/Lock.hs1
-rw-r--r--Command/LockContent.hs2
-rw-r--r--Command/Log.hs1
-rw-r--r--Command/LookupKey.hs3
-rw-r--r--Command/Map.hs1
-rw-r--r--Command/Merge.hs1
-rw-r--r--Command/MetaData.hs1
-rw-r--r--Command/Migrate.hs4
-rw-r--r--Command/Mirror.hs1
-rw-r--r--Command/Move.hs1
-rw-r--r--Command/NotifyChanges.hs1
-rw-r--r--Command/NumCopies.hs3
-rw-r--r--Command/PreCommit.hs1
-rw-r--r--Command/Proxy.hs1
-rw-r--r--Command/ReKey.hs2
-rw-r--r--Command/ReadPresentKey.hs2
-rw-r--r--Command/RecvKey.hs1
-rw-r--r--Command/RegisterUrl.hs1
-rw-r--r--Command/Reinit.hs2
-rw-r--r--Command/Reinject.hs1
-rw-r--r--Command/RemoteDaemon.hs1
-rw-r--r--Command/Repair.hs1
-rw-r--r--Command/ResolveMerge.hs1
-rw-r--r--Command/RmUrl.hs1
-rw-r--r--Command/Schedule.hs3
-rw-r--r--Command/SendKey.hs1
-rw-r--r--Command/SetKey.hs2
-rw-r--r--Command/SetPresentKey.hs2
-rw-r--r--Command/Smudge.hs1
-rw-r--r--Command/Status.hs1
-rw-r--r--Command/Sync.hs1
-rw-r--r--Command/Test.hs2
-rw-r--r--Command/TestRemote.hs5
-rw-r--r--Command/TransferInfo.hs2
-rw-r--r--Command/TransferKey.hs1
-rw-r--r--Command/TransferKeys.hs2
-rw-r--r--Command/Trust.hs1
-rw-r--r--Command/Unannex.hs1
-rw-r--r--Command/Undo.hs1
-rw-r--r--Command/Ungroup.hs1
-rw-r--r--Command/Uninit.hs3
-rw-r--r--Command/Unlock.hs1
-rw-r--r--Command/Unused.hs2
-rw-r--r--Command/Upgrade.hs1
-rw-r--r--Command/VAdd.hs1
-rw-r--r--Command/VCycle.hs1
-rw-r--r--Command/VFilter.hs1
-rw-r--r--Command/VPop.hs1
-rw-r--r--Command/Version.hs1
-rw-r--r--Command/Vicfg.hs1
-rw-r--r--Command/View.hs1
-rw-r--r--Command/Wanted.hs3
-rw-r--r--Command/Watch.hs3
-rw-r--r--Command/WebApp.hs1
-rw-r--r--Command/Whereis.hs2
-rw-r--r--Command/XMPPGit.hs1
95 files changed, 13 insertions, 145 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index e85cdd6c1..23c9318fd 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -7,7 +7,6 @@
module Command.Add where
-import Common.Annex
import Command
import Annex.Ingest
import Logs.Location
@@ -16,13 +15,11 @@ import Annex.Content.Direct
import Annex.Link
import qualified Annex
import qualified Annex.Queue
+import qualified Database.Keys
import Config
import Utility.InodeCache
import Annex.FileMatcher
import Annex.Version
-import qualified Database.Keys
-import Types.Key
-import CmdLine.Batch
cmd :: Command
cmd = notBareRepo $ withGlobalOptions (jobsOption : jsonOption : fileMatchingOptions) $
diff --git a/Command/AddUnused.hs b/Command/AddUnused.hs
index 57fd0cf38..7a9a1ba30 100644
--- a/Command/AddUnused.hs
+++ b/Command/AddUnused.hs
@@ -7,12 +7,10 @@
module Command.AddUnused where
-import Common.Annex
import Logs.Location
import Command
import Annex.Ingest
import Command.Unused (withUnusedMaps, UnusedMaps(..), startUnused)
-import Types.Key
cmd :: Command
cmd = notDirect $
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs
index 7d7796ba5..d42d6fb46 100644
--- a/Command/AddUrl.hs
+++ b/Command/AddUrl.hs
@@ -11,7 +11,6 @@ module Command.AddUrl where
import Network.URI
-import Common.Annex
import Command
import Backend
import qualified Annex
@@ -25,7 +24,6 @@ import Annex.Content
import Annex.Ingest
import Annex.UUID
import Logs.Web
-import Types.Key
import Types.KeySource
import Types.UrlContents
import Config
@@ -33,7 +31,6 @@ import Annex.Content.Direct
import Annex.FileMatcher
import Logs.Location
import Utility.Metered
-import CmdLine.Batch
import qualified Annex.Transfer as Transfer
#ifdef WITH_QUVI
import Annex.Quvi
diff --git a/Command/Assistant.hs b/Command/Assistant.hs
index 836be7b67..690f36f19 100644
--- a/Command/Assistant.hs
+++ b/Command/Assistant.hs
@@ -7,7 +7,6 @@
module Command.Assistant where
-import Common.Annex
import Command
import qualified Command.Watch
import Annex.Init
diff --git a/Command/CheckPresentKey.hs b/Command/CheckPresentKey.hs
index 6a38f8501..e8dabe18f 100644
--- a/Command/CheckPresentKey.hs
+++ b/Command/CheckPresentKey.hs
@@ -7,9 +7,7 @@
module Command.CheckPresentKey where
-import Common.Annex
import Command
-import Types.Key
import qualified Remote
import Annex
import Types.Messages
diff --git a/Command/Commit.hs b/Command/Commit.hs
index 52b88d2b3..131169e68 100644
--- a/Command/Commit.hs
+++ b/Command/Commit.hs
@@ -7,7 +7,6 @@
module Command.Commit where
-import Common.Annex
import Command
import qualified Annex.Branch
import qualified Git
diff --git a/Command/ConfigList.hs b/Command/ConfigList.hs
index 997016e8e..383117e52 100644
--- a/Command/ConfigList.hs
+++ b/Command/ConfigList.hs
@@ -7,7 +7,6 @@
module Command.ConfigList where
-import Common.Annex
import Command
import Annex.UUID
import Annex.Init
diff --git a/Command/ContentLocation.hs b/Command/ContentLocation.hs
index d228636f6..7cd6c2995 100644
--- a/Command/ContentLocation.hs
+++ b/Command/ContentLocation.hs
@@ -7,11 +7,8 @@
module Command.ContentLocation where
-import Common.Annex
import Command
-import CmdLine.Batch
import Annex.Content
-import Types.Key
cmd :: Command
cmd = noCommit $
diff --git a/Command/Copy.hs b/Command/Copy.hs
index 1fe31e36e..f48f579ef 100644
--- a/Command/Copy.hs
+++ b/Command/Copy.hs
@@ -7,7 +7,6 @@
module Command.Copy where
-import Common.Annex
import Command
import qualified Command.Move
import qualified Remote
diff --git a/Command/Dead.hs b/Command/Dead.hs
index 04c754d07..ecbe41293 100644
--- a/Command/Dead.hs
+++ b/Command/Dead.hs
@@ -8,9 +8,7 @@
module Command.Dead where
import Command
-import Common.Annex
import Types.TrustLevel
-import Types.Key
import Command.Trust (trustCommand)
import Logs.Location
import Remote (keyLocations)
diff --git a/Command/Describe.hs b/Command/Describe.hs
index ca0bac4e8..8872244f0 100644
--- a/Command/Describe.hs
+++ b/Command/Describe.hs
@@ -7,7 +7,6 @@
module Command.Describe where
-import Common.Annex
import Command
import qualified Remote
import Logs.UUID
diff --git a/Command/DiffDriver.hs b/Command/DiffDriver.hs
index 2313e5f0d..2c9b4a39d 100644
--- a/Command/DiffDriver.hs
+++ b/Command/DiffDriver.hs
@@ -7,7 +7,6 @@
module Command.DiffDriver where
-import Common.Annex
import Command
import Annex.Content
import Annex.Link
diff --git a/Command/Direct.hs b/Command/Direct.hs
index 9cfd258eb..32d63f059 100644
--- a/Command/Direct.hs
+++ b/Command/Direct.hs
@@ -7,7 +7,6 @@
module Command.Direct where
-import Common.Annex
import Command
import qualified Git
import qualified Git.LsFiles
diff --git a/Command/Drop.hs b/Command/Drop.hs
index b26a4842a..3513caba9 100644
--- a/Command/Drop.hs
+++ b/Command/Drop.hs
@@ -7,7 +7,6 @@
module Command.Drop where
-import Common.Annex
import Command
import qualified Remote
import qualified Annex
diff --git a/Command/DropKey.hs b/Command/DropKey.hs
index 3dea4b4b7..60d7d5fc7 100644
--- a/Command/DropKey.hs
+++ b/Command/DropKey.hs
@@ -7,7 +7,6 @@
module Command.DropKey where
-import Common.Annex
import Command
import qualified Annex
import Logs.Location
diff --git a/Command/DropUnused.hs b/Command/DropUnused.hs
index d9f02a370..edc11ea45 100644
--- a/Command/DropUnused.hs
+++ b/Command/DropUnused.hs
@@ -7,7 +7,6 @@
module Command.DropUnused where
-import Common.Annex
import Command
import qualified Command.Drop
import qualified Remote
diff --git a/Command/EnableRemote.hs b/Command/EnableRemote.hs
index b3ba451c2..182527095 100644
--- a/Command/EnableRemote.hs
+++ b/Command/EnableRemote.hs
@@ -7,7 +7,6 @@
module Command.EnableRemote where
-import Common.Annex
import Command
import qualified Logs.Remote
import qualified Types.Remote as R
diff --git a/Command/ExamineKey.hs b/Command/ExamineKey.hs
index 9c59697f3..1ca1f9fb5 100644
--- a/Command/ExamineKey.hs
+++ b/Command/ExamineKey.hs
@@ -7,12 +7,9 @@
module Command.ExamineKey where
-import Common.Annex
import Command
-import CmdLine.Batch
import qualified Utility.Format
import Command.Find (parseFormatOption, showFormatted, keyVars)
-import Types.Key
cmd :: Command
cmd = noCommit $ withGlobalOptions [jsonOption] $
diff --git a/Command/Expire.hs b/Command/Expire.hs
index 1e67d1d2a..fafee4506 100644
--- a/Command/Expire.hs
+++ b/Command/Expire.hs
@@ -7,7 +7,6 @@
module Command.Expire where
-import Common.Annex
import Command
import Logs.Activity
import Logs.UUID
diff --git a/Command/Find.hs b/Command/Find.hs
index c720ce76c..08c720575 100644
--- a/Command/Find.hs
+++ b/Command/Find.hs
@@ -10,14 +10,11 @@ module Command.Find where
import Data.Default
import qualified Data.Map as M
-import Common.Annex
import Command
import Annex.Content
import Limit
import qualified Utility.Format
import Utility.DataUnits
-import Types.Key
-import CmdLine.Batch
cmd :: Command
cmd = withGlobalOptions annexedMatchingOptions $ mkCommand $
diff --git a/Command/FindRef.hs b/Command/FindRef.hs
index 8de7d9e59..cb14371e0 100644
--- a/Command/FindRef.hs
+++ b/Command/FindRef.hs
@@ -7,7 +7,6 @@
module Command.FindRef where
-import Common.Annex
import Command
import qualified Command.Find as Find
diff --git a/Command/Fix.hs b/Command/Fix.hs
index e63cebf42..5565a6837 100644
--- a/Command/Fix.hs
+++ b/Command/Fix.hs
@@ -9,7 +9,6 @@
module Command.Fix where
-import Common.Annex
import Command
import Config
import qualified Annex
diff --git a/Command/Forget.hs b/Command/Forget.hs
index 584b56f8a..583eee7ca 100644
--- a/Command/Forget.hs
+++ b/Command/Forget.hs
@@ -7,7 +7,6 @@
module Command.Forget where
-import Common.Annex
import Command
import qualified Annex.Branch as Branch
import Logs.Transitions
diff --git a/Command/FromKey.hs b/Command/FromKey.hs
index 6a3fe3a4a..36cc1d31f 100644
--- a/Command/FromKey.hs
+++ b/Command/FromKey.hs
@@ -9,11 +9,9 @@
module Command.FromKey where
-import Common.Annex
import Command
import qualified Annex.Queue
import Annex.Content
-import Types.Key
import qualified Annex
import qualified Backend.URL
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index 3abf55aa3..08892e37f 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -9,12 +9,10 @@
module Command.Fsck where
-import Common.Annex
import Command
import qualified Annex
import qualified Remote
import qualified Types.Backend
-import qualified Types.Key
import qualified Backend
import Annex.Content
import Annex.Content.Direct
@@ -29,7 +27,6 @@ import Annex.NumCopies
import Annex.UUID
import Utility.DataUnits
import Config
-import Types.Key
import Utility.HumanTime
import Utility.CopyFile
import Git.FilePath
@@ -177,7 +174,7 @@ performRemote key file backend numcopies remote =
startKey :: Incremental -> Key -> NumCopies -> CommandStart
startKey inc key numcopies =
- case Backend.maybeLookupBackendName (Types.Key.keyBackendName key) of
+ case Backend.maybeLookupBackendName (keyBackendName key) of
Nothing -> stop
Just backend -> runFsck inc (key2file key) key $
performKey key backend numcopies
@@ -309,7 +306,7 @@ checkKeySizeRemote key remote (Just file) =
checkKeySizeOr (badContentRemote remote file) key file
checkKeySizeOr :: (Key -> Annex String) -> Key -> FilePath -> Annex Bool
-checkKeySizeOr bad key file = case Types.Key.keySize key of
+checkKeySizeOr bad key file = case keySize key of
Nothing -> return True
Just size -> do
size' <- liftIO $ getFileSize file
diff --git a/Command/FuzzTest.hs b/Command/FuzzTest.hs
index fd888e0df..4aed02d46 100644
--- a/Command/FuzzTest.hs
+++ b/Command/FuzzTest.hs
@@ -7,9 +7,8 @@
module Command.FuzzTest where
-import Common.Annex
-import qualified Annex
import Command
+import qualified Annex
import qualified Git.Config
import Config
import Utility.ThreadScheduler
diff --git a/Command/GCryptSetup.hs b/Command/GCryptSetup.hs
index 5c2686635..f2943ea13 100644
--- a/Command/GCryptSetup.hs
+++ b/Command/GCryptSetup.hs
@@ -7,7 +7,6 @@
module Command.GCryptSetup where
-import Common.Annex
import Command
import Annex.UUID
import qualified Remote.GCrypt
diff --git a/Command/Get.hs b/Command/Get.hs
index 07a501072..f49d202e1 100644
--- a/Command/Get.hs
+++ b/Command/Get.hs
@@ -7,7 +7,6 @@
module Command.Get where
-import Common.Annex
import Command
import qualified Remote
import Annex.Content
diff --git a/Command/Group.hs b/Command/Group.hs
index 6543fa2fb..8e901dfb3 100644
--- a/Command/Group.hs
+++ b/Command/Group.hs
@@ -7,7 +7,6 @@
module Command.Group where
-import Common.Annex
import Command
import qualified Remote
import Logs.Group
diff --git a/Command/GroupWanted.hs b/Command/GroupWanted.hs
index 0565344b1..6a9e300bf 100644
--- a/Command/GroupWanted.hs
+++ b/Command/GroupWanted.hs
@@ -7,7 +7,6 @@
module Command.GroupWanted where
-import Common.Annex
import Command
import Logs.PreferredContent
import Command.Wanted (performGet, performSet)
diff --git a/Command/Help.hs b/Command/Help.hs
index a44dcb234..419d1ea42 100644
--- a/Command/Help.hs
+++ b/Command/Help.hs
@@ -7,7 +7,6 @@
module Command.Help where
-import Common.Annex
import Command
import qualified Command.Init
import qualified Command.Add
diff --git a/Command/Import.hs b/Command/Import.hs
index 4e9ff69dc..847841930 100644
--- a/Command/Import.hs
+++ b/Command/Import.hs
@@ -7,7 +7,6 @@
module Command.Import where
-import Common.Annex
import Command
import qualified Git
import qualified Annex
@@ -16,7 +15,6 @@ import Utility.CopyFile
import Backend
import Remote
import Types.KeySource
-import Types.Key
import Annex.CheckIgnore
import Annex.NumCopies
import Types.FileMatcher
diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs
index 2db6e608a..6abb3f694 100644
--- a/Command/ImportFeed.hs
+++ b/Command/ImportFeed.hs
@@ -20,9 +20,8 @@ import Data.Time.Format
import System.Locale
#endif
-import Common.Annex
-import qualified Annex
import Command
+import qualified Annex
import qualified Annex.Url as Url
import qualified Remote
import qualified Types.Remote as Remote
diff --git a/Command/InAnnex.hs b/Command/InAnnex.hs
index c00f18ead..682f32aef 100644
--- a/Command/InAnnex.hs
+++ b/Command/InAnnex.hs
@@ -7,7 +7,6 @@
module Command.InAnnex where
-import Common.Annex
import Command
import Annex.Content
diff --git a/Command/Indirect.hs b/Command/Indirect.hs
index 06897e292..74841a5f6 100644
--- a/Command/Indirect.hs
+++ b/Command/Indirect.hs
@@ -7,7 +7,6 @@
module Command.Indirect where
-import Common.Annex
import Command
import qualified Git
import qualified Git.Branch
diff --git a/Command/Info.hs b/Command/Info.hs
index 144f499e5..ede61a369 100644
--- a/Command/Info.hs
+++ b/Command/Info.hs
@@ -14,16 +14,14 @@ import qualified Data.Map.Strict as M
import Text.JSON
import Data.Ord
-import Common.Annex
+import Command
import qualified Git
import qualified Annex
import qualified Remote
import qualified Types.Remote as Remote
-import Command
import Utility.DataUnits
import Utility.DiskFree
import Annex.Content
-import Types.Key
import Logs.UUID
import Logs.Trust
import Logs.Location
@@ -38,7 +36,6 @@ import qualified Limit
import Messages.JSON (DualDisp(..))
import Annex.BloomFilter
import qualified Command.Unused
-import CmdLine.Batch
-- a named computation that produces a statistic
type Stat = StatState (Maybe (String, StatState String))
diff --git a/Command/Init.hs b/Command/Init.hs
index 94d8168a6..3c38c0f8a 100644
--- a/Command/Init.hs
+++ b/Command/Init.hs
@@ -7,7 +7,6 @@
module Command.Init where
-import Common.Annex
import Command
import Annex.Init
import Annex.Version
diff --git a/Command/InitRemote.hs b/Command/InitRemote.hs
index 60b5220e5..1f3d63dbd 100644
--- a/Command/InitRemote.hs
+++ b/Command/InitRemote.hs
@@ -9,9 +9,8 @@ module Command.InitRemote where
import qualified Data.Map as M
-import Common.Annex
-import Annex.SpecialRemote
import Command
+import Annex.SpecialRemote
import qualified Remote
import qualified Logs.Remote
import qualified Types.Remote as R
diff --git a/Command/List.hs b/Command/List.hs
index c912e8c3f..786db7b79 100644
--- a/Command/List.hs
+++ b/Command/List.hs
@@ -14,7 +14,6 @@ import Data.Function
import Data.Tuple.Utils
import Data.Ord
-import Common.Annex
import Command
import Remote
import Logs.Trust
diff --git a/Command/Lock.hs b/Command/Lock.hs
index 4e42a8d76..9611d2407 100644
--- a/Command/Lock.hs
+++ b/Command/Lock.hs
@@ -7,7 +7,6 @@
module Command.Lock where
-import Common.Annex
import Command
import qualified Annex.Queue
import qualified Annex
diff --git a/Command/LockContent.hs b/Command/LockContent.hs
index 72b2bb096..ce812ef30 100644
--- a/Command/LockContent.hs
+++ b/Command/LockContent.hs
@@ -7,10 +7,8 @@
module Command.LockContent where
-import Common.Annex
import Command
import Annex.Content
-import Types.Key
import Remote.Helper.Ssh (contentLockedMarker)
cmd :: Command
diff --git a/Command/Log.hs b/Command/Log.hs
index 86b32b937..94c085adc 100644
--- a/Command/Log.hs
+++ b/Command/Log.hs
@@ -19,7 +19,6 @@ import Data.Time
import System.Locale
#endif
-import Common.Annex
import Command
import Logs
import qualified Logs.Presence
diff --git a/Command/LookupKey.hs b/Command/LookupKey.hs
index 1a0d96935..1f21a582e 100644
--- a/Command/LookupKey.hs
+++ b/Command/LookupKey.hs
@@ -7,11 +7,8 @@
module Command.LookupKey where
-import Common.Annex
import Command
-import CmdLine.Batch
import Annex.CatFile
-import Types.Key
cmd :: Command
cmd = notBareRepo $ noCommit $
diff --git a/Command/Map.hs b/Command/Map.hs
index e7789bdac..8aa59e38d 100644
--- a/Command/Map.hs
+++ b/Command/Map.hs
@@ -9,7 +9,6 @@ module Command.Map where
import qualified Data.Map as M
-import Common.Annex
import Command
import qualified Git
import qualified Git.Url
diff --git a/Command/Merge.hs b/Command/Merge.hs
index 8ea4e79e4..6ea8a68b1 100644
--- a/Command/Merge.hs
+++ b/Command/Merge.hs
@@ -7,7 +7,6 @@
module Command.Merge where
-import Common.Annex
import Command
import qualified Annex.Branch
import qualified Git.Branch
diff --git a/Command/MetaData.hs b/Command/MetaData.hs
index 788c0f2ff..db1179701 100644
--- a/Command/MetaData.hs
+++ b/Command/MetaData.hs
@@ -7,7 +7,6 @@
module Command.MetaData where
-import Common.Annex
import Command
import Annex.MetaData
import Logs.MetaData
diff --git a/Command/Migrate.hs b/Command/Migrate.hs
index f0100cdc2..0ae6f7d80 100644
--- a/Command/Migrate.hs
+++ b/Command/Migrate.hs
@@ -7,10 +7,8 @@
module Command.Migrate where
-import Common.Annex
import Command
import Backend
-import qualified Types.Key
import Types.Backend (canUpgradeKey, fastMigrate)
import Types.KeySource
import Annex.Content
@@ -55,7 +53,7 @@ start file key = do
- - Something has changed in the backend, such as a bug fix.
-}
upgradableKey :: Backend -> Key -> Bool
-upgradableKey backend key = isNothing (Types.Key.keySize key) || backendupgradable
+upgradableKey backend key = isNothing (keySize key) || backendupgradable
where
backendupgradable = maybe False (\a -> a key) (canUpgradeKey backend)
diff --git a/Command/Mirror.hs b/Command/Mirror.hs
index 148ca8d3c..8fdba123b 100644
--- a/Command/Mirror.hs
+++ b/Command/Mirror.hs
@@ -7,7 +7,6 @@
module Command.Mirror where
-import Common.Annex
import Command
import qualified Command.Move
import qualified Command.Drop
diff --git a/Command/Move.hs b/Command/Move.hs
index 7a0b57c10..710d09d06 100644
--- a/Command/Move.hs
+++ b/Command/Move.hs
@@ -7,7 +7,6 @@
module Command.Move where
-import Common.Annex
import Command
import qualified Command.Drop
import qualified Annex
diff --git a/Command/NotifyChanges.hs b/Command/NotifyChanges.hs
index 091208349..f1c149d54 100644
--- a/Command/NotifyChanges.hs
+++ b/Command/NotifyChanges.hs
@@ -7,7 +7,6 @@
module Command.NotifyChanges where
-import Common.Annex
import Command
import Utility.DirWatcher
import Utility.DirWatcher.Types
diff --git a/Command/NumCopies.hs b/Command/NumCopies.hs
index 5675d3161..0a9c4404b 100644
--- a/Command/NumCopies.hs
+++ b/Command/NumCopies.hs
@@ -7,9 +7,8 @@
module Command.NumCopies where
-import Common.Annex
-import qualified Annex
import Command
+import qualified Annex
import Annex.NumCopies
import Types.Messages
diff --git a/Command/PreCommit.hs b/Command/PreCommit.hs
index 383a33665..f55318475 100644
--- a/Command/PreCommit.hs
+++ b/Command/PreCommit.hs
@@ -9,7 +9,6 @@
module Command.PreCommit where
-import Common.Annex
import Command
import Config
import qualified Command.Add
diff --git a/Command/Proxy.hs b/Command/Proxy.hs
index a99e1f4b5..f1f7f194f 100644
--- a/Command/Proxy.hs
+++ b/Command/Proxy.hs
@@ -7,7 +7,6 @@
module Command.Proxy where
-import Common.Annex
import Command
import Config
import Utility.Tmp
diff --git a/Command/ReKey.hs b/Command/ReKey.hs
index 91329ec82..79c588ccc 100644
--- a/Command/ReKey.hs
+++ b/Command/ReKey.hs
@@ -7,10 +7,8 @@
module Command.ReKey where
-import Common.Annex
import Command
import qualified Annex
-import Types.Key
import Annex.Content
import Annex.Ingest
import Annex.Link
diff --git a/Command/ReadPresentKey.hs b/Command/ReadPresentKey.hs
index 2b0b51fe3..1eba2cc12 100644
--- a/Command/ReadPresentKey.hs
+++ b/Command/ReadPresentKey.hs
@@ -7,10 +7,8 @@
module Command.ReadPresentKey where
-import Common.Annex
import Command
import Logs.Location
-import Types.Key
cmd :: Command
cmd = noCommit $
diff --git a/Command/RecvKey.hs b/Command/RecvKey.hs
index 51bf69b1f..5bd2d8b59 100644
--- a/Command/RecvKey.hs
+++ b/Command/RecvKey.hs
@@ -7,7 +7,6 @@
module Command.RecvKey where
-import Common.Annex
import Command
import Annex.Content
import Annex.Action
diff --git a/Command/RegisterUrl.hs b/Command/RegisterUrl.hs
index b2b0d7d32..273d111b0 100644
--- a/Command/RegisterUrl.hs
+++ b/Command/RegisterUrl.hs
@@ -9,7 +9,6 @@
module Command.RegisterUrl where
-import Common.Annex
import Command
import Logs.Web
import Command.FromKey (mkKey)
diff --git a/Command/Reinit.hs b/Command/Reinit.hs
index e2c00a3d2..25001db43 100644
--- a/Command/Reinit.hs
+++ b/Command/Reinit.hs
@@ -7,11 +7,9 @@
module Command.Reinit where
-import Common.Annex
import Command
import Annex.Init
import Annex.UUID
-import Types.UUID
import qualified Remote
import qualified Annex.SpecialRemote
diff --git a/Command/Reinject.hs b/Command/Reinject.hs
index 1c21b4ae6..d50db18af 100644
--- a/Command/Reinject.hs
+++ b/Command/Reinject.hs
@@ -7,7 +7,6 @@
module Command.Reinject where
-import Common.Annex
import Command
import Logs.Location
import Annex.Content
diff --git a/Command/RemoteDaemon.hs b/Command/RemoteDaemon.hs
index 962189da1..7c7ecef4b 100644
--- a/Command/RemoteDaemon.hs
+++ b/Command/RemoteDaemon.hs
@@ -7,7 +7,6 @@
module Command.RemoteDaemon where
-import Common.Annex
import Command
import RemoteDaemon.Core
diff --git a/Command/Repair.hs b/Command/Repair.hs
index f4c92b02f..65e929be8 100644
--- a/Command/Repair.hs
+++ b/Command/Repair.hs
@@ -7,7 +7,6 @@
module Command.Repair where
-import Common.Annex
import Command
import qualified Annex
import qualified Git.Repair
diff --git a/Command/ResolveMerge.hs b/Command/ResolveMerge.hs
index 148ce9e5c..12fe8cfd3 100644
--- a/Command/ResolveMerge.hs
+++ b/Command/ResolveMerge.hs
@@ -7,7 +7,6 @@
module Command.ResolveMerge where
-import Common.Annex
import Command
import qualified Git
import Git.Sha
diff --git a/Command/RmUrl.hs b/Command/RmUrl.hs
index fe8c1e0cd..eb78f7ba7 100644
--- a/Command/RmUrl.hs
+++ b/Command/RmUrl.hs
@@ -7,7 +7,6 @@
module Command.RmUrl where
-import Common.Annex
import Command
import Logs.Web
import qualified Remote
diff --git a/Command/Schedule.hs b/Command/Schedule.hs
index 266208f9a..5721e98e7 100644
--- a/Command/Schedule.hs
+++ b/Command/Schedule.hs
@@ -7,9 +7,8 @@
module Command.Schedule where
-import Common.Annex
-import qualified Annex
import Command
+import qualified Annex
import qualified Remote
import Logs.Schedule
import Types.ScheduledActivity
diff --git a/Command/SendKey.hs b/Command/SendKey.hs
index 3b1cafb42..96fc1bb0d 100644
--- a/Command/SendKey.hs
+++ b/Command/SendKey.hs
@@ -7,7 +7,6 @@
module Command.SendKey where
-import Common.Annex
import Command
import Annex.Content
import Annex
diff --git a/Command/SetKey.hs b/Command/SetKey.hs
index 13715d3a7..fd7a4ab88 100644
--- a/Command/SetKey.hs
+++ b/Command/SetKey.hs
@@ -7,11 +7,9 @@
module Command.SetKey where
-import Common.Annex
import Command
import Logs.Location
import Annex.Content
-import Types.Key
cmd :: Command
cmd = command "setkey" SectionPlumbing "sets annexed content for a key"
diff --git a/Command/SetPresentKey.hs b/Command/SetPresentKey.hs
index 831a62883..35ede9553 100644
--- a/Command/SetPresentKey.hs
+++ b/Command/SetPresentKey.hs
@@ -7,11 +7,9 @@
module Command.SetPresentKey where
-import Common.Annex
import Command
import Logs.Location
import Logs.Presence.Pure
-import Types.Key
cmd :: Command
cmd = noCommit $
diff --git a/Command/Smudge.hs b/Command/Smudge.hs
index 1ca3de2c3..6718b4908 100644
--- a/Command/Smudge.hs
+++ b/Command/Smudge.hs
@@ -7,7 +7,6 @@
module Command.Smudge where
-import Common.Annex
import Command
import Annex.Content
import Annex.Link
diff --git a/Command/Status.hs b/Command/Status.hs
index af0a1282f..260cf2ab4 100644
--- a/Command/Status.hs
+++ b/Command/Status.hs
@@ -7,7 +7,6 @@
module Command.Status where
-import Common.Annex
import Command
import Annex.CatFile
import Annex.Content.Direct
diff --git a/Command/Sync.hs b/Command/Sync.hs
index 2de92188b..0c12fa090 100644
--- a/Command/Sync.hs
+++ b/Command/Sync.hs
@@ -19,7 +19,6 @@ module Command.Sync (
updateSyncBranch,
) where
-import Common.Annex
import Command
import qualified Annex
import qualified Annex.Branch
diff --git a/Command/Test.hs b/Command/Test.hs
index 35d6e1504..5180f96ed 100644
--- a/Command/Test.hs
+++ b/Command/Test.hs
@@ -7,9 +7,7 @@
module Command.Test where
-import Common
import Command
-import Messages
import Types.Test
cmd :: Parser TestOptions -> Maybe TestRunner -> Command
diff --git a/Command/TestRemote.hs b/Command/TestRemote.hs
index f66a77ba7..5c5d62e1d 100644
--- a/Command/TestRemote.hs
+++ b/Command/TestRemote.hs
@@ -7,13 +7,10 @@
module Command.TestRemote where
-import Common
import Command
import qualified Annex
import qualified Remote
import qualified Types.Remote as Remote
-import Types
-import Types.Key (key2file, keyBackendName, keySize)
import Types.Backend (getKey, verifyKeyContent)
import Types.KeySource
import Annex.Content
@@ -23,10 +20,8 @@ import Utility.Tmp
import Utility.Metered
import Utility.DataUnits
import Utility.CopyFile
-import Messages
import Types.Messages
import Remote.Helper.Chunked
-import Locations
import Git.Types
import Test.Tasty
diff --git a/Command/TransferInfo.hs b/Command/TransferInfo.hs
index 2b5713d77..4db3f8de3 100644
--- a/Command/TransferInfo.hs
+++ b/Command/TransferInfo.hs
@@ -7,11 +7,9 @@
module Command.TransferInfo where
-import Common.Annex
import Command
import Annex.Content
import Logs.Transfer
-import Types.Key
import qualified CmdLine.GitAnnexShell.Fields as Fields
import Utility.Metered
diff --git a/Command/TransferKey.hs b/Command/TransferKey.hs
index 56c9ec675..69559f4cf 100644
--- a/Command/TransferKey.hs
+++ b/Command/TransferKey.hs
@@ -7,7 +7,6 @@
module Command.TransferKey where
-import Common.Annex
import Command
import Annex.Content
import Logs.Location
diff --git a/Command/TransferKeys.hs b/Command/TransferKeys.hs
index 4fb0d9069..005e491b4 100644
--- a/Command/TransferKeys.hs
+++ b/Command/TransferKeys.hs
@@ -9,13 +9,11 @@
module Command.TransferKeys where
-import Common.Annex
import Command
import Annex.Content
import Logs.Location
import Annex.Transfer
import qualified Remote
-import Types.Key
import Utility.SimpleProtocol (dupIoHandles)
import Git.Types (RemoteName)
diff --git a/Command/Trust.hs b/Command/Trust.hs
index 33ecc2e64..688dc7f93 100644
--- a/Command/Trust.hs
+++ b/Command/Trust.hs
@@ -7,7 +7,6 @@
module Command.Trust where
-import Common.Annex
import Command
import qualified Remote
import Types.TrustLevel
diff --git a/Command/Unannex.hs b/Command/Unannex.hs
index 317fd5856..9e6044109 100644
--- a/Command/Unannex.hs
+++ b/Command/Unannex.hs
@@ -9,7 +9,6 @@
module Command.Unannex where
-import Common.Annex
import Command
import Config
import qualified Annex
diff --git a/Command/Undo.hs b/Command/Undo.hs
index 0692dce34..24c099f92 100644
--- a/Command/Undo.hs
+++ b/Command/Undo.hs
@@ -7,7 +7,6 @@
module Command.Undo where
-import Common.Annex
import Command
import Config
import Annex.Direct
diff --git a/Command/Ungroup.hs b/Command/Ungroup.hs
index cd2ebdf9b..5f84a375f 100644
--- a/Command/Ungroup.hs
+++ b/Command/Ungroup.hs
@@ -7,7 +7,6 @@
module Command.Ungroup where
-import Common.Annex
import Command
import qualified Remote
import Logs.Group
diff --git a/Command/Uninit.hs b/Command/Uninit.hs
index cc237db5e..44f4b0ded 100644
--- a/Command/Uninit.hs
+++ b/Command/Uninit.hs
@@ -7,9 +7,8 @@
module Command.Uninit where
-import Common.Annex
-import qualified Annex
import Command
+import qualified Annex
import qualified Git
import qualified Git.Command
import qualified Command.Unannex
diff --git a/Command/Unlock.hs b/Command/Unlock.hs
index bef800840..ded44fd2f 100644
--- a/Command/Unlock.hs
+++ b/Command/Unlock.hs
@@ -7,7 +7,6 @@
module Command.Unlock where
-import Common.Annex
import Command
import Annex.Content
import Annex.CatFile
diff --git a/Command/Unused.hs b/Command/Unused.hs
index 84be0eefb..b6f3e93b6 100644
--- a/Command/Unused.hs
+++ b/Command/Unused.hs
@@ -11,7 +11,6 @@ module Command.Unused where
import qualified Data.Map as M
-import Common.Annex
import Command
import Logs.Unused
import Annex.Content
@@ -28,7 +27,6 @@ import qualified Remote
import qualified Annex.Branch
import Annex.Link
import Annex.CatFile
-import Types.Key
import Types.RefSpec
import Git.Types
import Git.Sha
diff --git a/Command/Upgrade.hs b/Command/Upgrade.hs
index 8a34022e3..432250a1a 100644
--- a/Command/Upgrade.hs
+++ b/Command/Upgrade.hs
@@ -7,7 +7,6 @@
module Command.Upgrade where
-import Common.Annex
import Command
import Upgrade
diff --git a/Command/VAdd.hs b/Command/VAdd.hs
index ac70da264..a4b3f379f 100644
--- a/Command/VAdd.hs
+++ b/Command/VAdd.hs
@@ -7,7 +7,6 @@
module Command.VAdd where
-import Common.Annex
import Command
import Annex.View
import Command.View (checkoutViewBranch)
diff --git a/Command/VCycle.hs b/Command/VCycle.hs
index a3c61d859..20fc9a22a 100644
--- a/Command/VCycle.hs
+++ b/Command/VCycle.hs
@@ -7,7 +7,6 @@
module Command.VCycle where
-import Common.Annex
import Command
import Annex.View
import Types.View
diff --git a/Command/VFilter.hs b/Command/VFilter.hs
index 259d36068..60bbcd3d3 100644
--- a/Command/VFilter.hs
+++ b/Command/VFilter.hs
@@ -7,7 +7,6 @@
module Command.VFilter where
-import Common.Annex
import Command
import Annex.View
import Command.View (paramView, checkoutViewBranch)
diff --git a/Command/VPop.hs b/Command/VPop.hs
index ba6f4ee5c..8490567dc 100644
--- a/Command/VPop.hs
+++ b/Command/VPop.hs
@@ -7,7 +7,6 @@
module Command.VPop where
-import Common.Annex
import Command
import qualified Git
import qualified Git.Command
diff --git a/Command/Version.hs b/Command/Version.hs
index c5a9fcef2..1cfc0aedc 100644
--- a/Command/Version.hs
+++ b/Command/Version.hs
@@ -7,7 +7,6 @@
module Command.Version where
-import Common.Annex
import Command
import qualified Build.SysConfig as SysConfig
import Annex.Version
diff --git a/Command/Vicfg.hs b/Command/Vicfg.hs
index cec032b80..d7963725a 100644
--- a/Command/Vicfg.hs
+++ b/Command/Vicfg.hs
@@ -16,7 +16,6 @@ import Data.Tuple (swap)
import Data.Char (isSpace)
import Data.Default
-import Common.Annex
import Command
import Annex.Perms
import Types.TrustLevel
diff --git a/Command/View.hs b/Command/View.hs
index 3fdbbb9c5..65985fdac 100644
--- a/Command/View.hs
+++ b/Command/View.hs
@@ -7,7 +7,6 @@
module Command.View where
-import Common.Annex
import Command
import qualified Git
import qualified Git.Command
diff --git a/Command/Wanted.hs b/Command/Wanted.hs
index 649f19c2b..10f684567 100644
--- a/Command/Wanted.hs
+++ b/Command/Wanted.hs
@@ -7,9 +7,8 @@
module Command.Wanted where
-import Common.Annex
-import qualified Annex
import Command
+import qualified Annex
import qualified Remote
import Logs.PreferredContent
import Types.Messages
diff --git a/Command/Watch.hs b/Command/Watch.hs
index ac2f27397..9bc92d85b 100644
--- a/Command/Watch.hs
+++ b/Command/Watch.hs
@@ -7,9 +7,8 @@
module Command.Watch where
-import Common.Annex
-import Assistant
import Command
+import Assistant
import Utility.HumanTime
cmd :: Command
diff --git a/Command/WebApp.hs b/Command/WebApp.hs
index f2935380d..8c11c18bd 100644
--- a/Command/WebApp.hs
+++ b/Command/WebApp.hs
@@ -9,7 +9,6 @@
module Command.WebApp where
-import Common.Annex
import Command
import Assistant
import Assistant.Common
diff --git a/Command/Whereis.hs b/Command/Whereis.hs
index bf4cbfe97..5b913cf45 100644
--- a/Command/Whereis.hs
+++ b/Command/Whereis.hs
@@ -7,14 +7,12 @@
module Command.Whereis where
-import Common.Annex
import Command
import Remote
import Logs.Trust
import Logs.Web
import Remote.Web (getWebUrls)
import Annex.UUID
-import CmdLine.Batch
import qualified Data.Map as M
diff --git a/Command/XMPPGit.hs b/Command/XMPPGit.hs
index 20e7f0743..0a7178df8 100644
--- a/Command/XMPPGit.hs
+++ b/Command/XMPPGit.hs
@@ -7,7 +7,6 @@
module Command.XMPPGit where
-import Common.Annex
import Command
import Assistant.XMPP.Git