use trustExclude
This commit is contained in:
parent
ec337baaee
commit
6a0756d2fb
4 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue