From 6a0756d2fb6a58b5f2113fcc6aa4639bfdce708e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 11 Nov 2012 00:26:29 -0400 Subject: [PATCH] use trustExclude --- Assistant/DaemonStatus.hs | 2 +- Assistant/Drop.hs | 2 +- Assistant/WebApp/Configurators.hs | 4 ++-- Remote.hs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs index 5e1ecab3ce..a93f4105a6 100644 --- a/Assistant/DaemonStatus.hs +++ b/Assistant/DaemonStatus.hs @@ -46,7 +46,7 @@ calcSyncRemotes :: Annex [Remote] calcSyncRemotes = do rs <- filterM (repoSyncable . Remote.repo) =<< concat . Remote.byCost <$> Remote.enabledRemoteList - alive <- snd <$> trustPartition DeadTrusted (map Remote.uuid rs) + alive <- trustExclude DeadTrusted (map Remote.uuid rs) let good r = Remote.uuid r `elem` alive return $ filter good rs diff --git a/Assistant/Drop.hs b/Assistant/Drop.hs index a02f586528..d28a05a53e 100644 --- a/Assistant/Drop.hs +++ b/Assistant/Drop.hs @@ -39,7 +39,7 @@ handleDrops' locs rs fromhere key (Just f) | otherwise = go rs =<< getcopies where getcopies = do - have <- length . snd <$> trustPartition UnTrusted locs + have <- length <$> trustExclude UnTrusted locs numcopies <- getNumCopies =<< numCopies f return (have, numcopies) checkcopies (have, numcopies) = have > numcopies diff --git a/Assistant/WebApp/Configurators.hs b/Assistant/WebApp/Configurators.hs index 45be6e06fb..20db15737a 100644 --- a/Assistant/WebApp/Configurators.hs +++ b/Assistant/WebApp/Configurators.hs @@ -127,8 +127,8 @@ repoList onlycloud onlyconfigured includehere rest = runAnnex [] $ do m <- readRemoteLog unconfigured <- map snd . catMaybes . filter wantedremote - . map (findinfo m) . snd - <$> (trustPartition DeadTrusted $ M.keys m) + . map (findinfo m) + <$> (trustExclude DeadTrusted $ M.keys m) unsyncable <- map Remote.uuid . filter wantedrepo <$> (filterM (\r -> not <$> repoSyncable (Remote.repo r)) =<< Remote.enabledRemoteList) diff --git a/Remote.hs b/Remote.hs index 272fc6d237..721b64edb5 100644 --- a/Remote.hs +++ b/Remote.hs @@ -169,7 +169,7 @@ remotesWithoutUUID rs us = filter (\r -> uuid r `notElem` us) rs {- List of repository UUIDs that the location log indicates may have a key. - Dead repositories are excluded. -} keyLocations :: Key -> Annex [UUID] -keyLocations key = snd <$> (trustPartition DeadTrusted =<< loggedLocations key) +keyLocations key = trustExclude DeadTrusted =<< loggedLocations key {- Cost ordered lists of remotes that the location log indicates - may have a key.