diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-22 14:27:50 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-22 14:27:50 -0400 |
commit | d3f0106f2ed15a4e4abbc09cc3e985a27dfee662 (patch) | |
tree | 2d5867dd13895eabc4def6412d791f543f3e2710 /Command | |
parent | 78a325b09315efd593e6b729de18f15871a0d643 (diff) |
move LocationLog into Annex monad from IO
It will need to run in Annex so it can use Branch
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Fsck.hs | 2 | ||||
-rw-r--r-- | Command/Unused.hs | 4 | ||||
-rw-r--r-- | Command/Whereis.hs | 4 |
3 files changed, 4 insertions, 6 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs index adfd702de..7c840d528 100644 --- a/Command/Fsck.hs +++ b/Command/Fsck.hs @@ -60,7 +60,7 @@ verifyLocationLog key file = do preventWrite (parentDir f) u <- getUUID g - uuids <- liftIO $ keyLocations g key + uuids <- keyLocations g key case (present, u `elem` uuids) of (True, False) -> do diff --git a/Command/Unused.hs b/Command/Unused.hs index 5422dad69..4389b2209 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -68,7 +68,7 @@ checkRemoteUnused' r = do showNote $ "checking for unused data..." g <- Annex.gitRepo referenced <- getKeysReferenced - logged <- liftIO $ loggedKeys g + logged <- loggedKeys g remotehas <- filterM isthere logged let remoteunused = remotehas `exclude` referenced let list = number 0 remoteunused @@ -79,7 +79,7 @@ checkRemoteUnused' r = do where isthere k = do g <- Annex.gitRepo - us <- liftIO $ keyLocations g k + us <- keyLocations g k return $ uuid `elem` us uuid = Remote.uuid r diff --git a/Command/Whereis.hs b/Command/Whereis.hs index 2e0fa15f6..bcd4a2e22 100644 --- a/Command/Whereis.hs +++ b/Command/Whereis.hs @@ -7,8 +7,6 @@ module Command.Whereis where -import Control.Monad.State (liftIO) - import qualified Annex import LocationLog import Command @@ -31,7 +29,7 @@ start file = isAnnexed file $ \(key, _) -> do perform :: Key -> CommandPerform perform key = do g <- Annex.gitRepo - uuids <- liftIO $ keyLocations g key + uuids <- keyLocations g key let num = length uuids showNote $ show num ++ " " ++ copiesplural num if null $ uuids |