diff options
author | 2012-01-10 13:11:16 -0400 | |
---|---|---|
committer | 2012-01-10 13:32:38 -0400 | |
commit | 07cacbeee95b377e1bf4111e4d4b30190956c585 (patch) | |
tree | 17249f177a6ffde3d2f524ee66a9a6b2530bd92e /Logs/Location.hs | |
parent | 0d5c4022105a393a4eac76b09940f8b22fa0a56c (diff) |
break module dependancy loop
A PITA but worth it to clean up the trust configuration code.
Diffstat (limited to 'Logs/Location.hs')
-rw-r--r-- | Logs/Location.hs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Logs/Location.hs b/Logs/Location.hs index 588962bc5..b6d59b928 100644 --- a/Logs/Location.hs +++ b/Logs/Location.hs @@ -16,8 +16,7 @@ module Logs.Location ( LogStatus(..), logChange, - readLog, - keyLocations, + loggedLocations, loggedKeys, loggedKeysFor, logFile, @@ -27,7 +26,6 @@ module Logs.Location ( import Common.Annex import qualified Annex.Branch import Logs.Presence -import Logs.Trust {- Log a change in the presence of a key's value in a repository. -} logChange :: Key -> UUID -> LogStatus -> Annex () @@ -36,13 +34,9 @@ logChange _ NoUUID _ = return () {- Returns a list of repository UUIDs that, according to the log, have - the value of a key. - - - - Dead repositories are skipped. -} -keyLocations :: Key -> Annex [UUID] -keyLocations key = do - l <- map toUUID <$> (currentLog . logFile) key - snd <$> trustPartition DeadTrusted l +loggedLocations :: Key -> Annex [UUID] +loggedLocations key = map toUUID <$> (currentLog . logFile) key {- Finds all keys that have location log information. - (There may be duplicate keys in the list.) -} @@ -57,7 +51,7 @@ loggedKeysFor u = filterM isthere =<< loggedKeys {- This should run strictly to avoid the filterM - building many thunks containing keyLocations data. -} isthere k = do - us <- keyLocations k + us <- loggedLocations k let !there = u `elem` us return there |