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
|
calcSyncRemotes = do
|
||||||
rs <- filterM (repoSyncable . Remote.repo) =<<
|
rs <- filterM (repoSyncable . Remote.repo) =<<
|
||||||
concat . Remote.byCost <$> Remote.enabledRemoteList
|
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
|
let good r = Remote.uuid r `elem` alive
|
||||||
return $ filter good rs
|
return $ filter good rs
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ handleDrops' locs rs fromhere key (Just f)
|
||||||
| otherwise = go rs =<< getcopies
|
| otherwise = go rs =<< getcopies
|
||||||
where
|
where
|
||||||
getcopies = do
|
getcopies = do
|
||||||
have <- length . snd <$> trustPartition UnTrusted locs
|
have <- length <$> trustExclude UnTrusted locs
|
||||||
numcopies <- getNumCopies =<< numCopies f
|
numcopies <- getNumCopies =<< numCopies f
|
||||||
return (have, numcopies)
|
return (have, numcopies)
|
||||||
checkcopies (have, numcopies) = have > numcopies
|
checkcopies (have, numcopies) = have > numcopies
|
||||||
|
|
|
@ -127,8 +127,8 @@ repoList onlycloud onlyconfigured includehere
|
||||||
rest = runAnnex [] $ do
|
rest = runAnnex [] $ do
|
||||||
m <- readRemoteLog
|
m <- readRemoteLog
|
||||||
unconfigured <- map snd . catMaybes . filter wantedremote
|
unconfigured <- map snd . catMaybes . filter wantedremote
|
||||||
. map (findinfo m) . snd
|
. map (findinfo m)
|
||||||
<$> (trustPartition DeadTrusted $ M.keys m)
|
<$> (trustExclude DeadTrusted $ M.keys m)
|
||||||
unsyncable <- map Remote.uuid . filter wantedrepo <$>
|
unsyncable <- map Remote.uuid . filter wantedrepo <$>
|
||||||
(filterM (\r -> not <$> repoSyncable (Remote.repo r))
|
(filterM (\r -> not <$> repoSyncable (Remote.repo r))
|
||||||
=<< Remote.enabledRemoteList)
|
=<< 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.
|
{- List of repository UUIDs that the location log indicates may have a key.
|
||||||
- Dead repositories are excluded. -}
|
- Dead repositories are excluded. -}
|
||||||
keyLocations :: Key -> Annex [UUID]
|
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
|
{- Cost ordered lists of remotes that the location log indicates
|
||||||
- may have a key.
|
- may have a key.
|
||||||
|
|
Loading…
Add table
Reference in a new issue