From 57b03630b36bf0ed9920ffd5151d14d62ae8f6a9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 21 Dec 2020 13:46:04 -0400 Subject: [PATCH] support thirdPartyPopulated These don't have importTree in their config, because they don't support tree import, but they do still support import, and do not support export or key/value modification. --- Annex/Drop.hs | 3 ++- Assistant/DaemonStatus.hs | 3 ++- Command/Sync.hs | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Annex/Drop.hs b/Annex/Drop.hs index 1a6af18586..fca96c1530 100644 --- a/Annex/Drop.hs +++ b/Annex/Drop.hs @@ -11,7 +11,7 @@ import Annex.Common import qualified Annex import Logs.Trust import Annex.NumCopies -import Types.Remote (uuid, appendonly, config) +import Types.Remote (uuid, appendonly, config, remotetype, thirdPartyPopulated) import qualified Remote import qualified Command.Drop import Command @@ -88,6 +88,7 @@ handleDropsFrom locs rs reason fromhere key afile si preverified runner = do | appendonly r = go fs rest n | exportTree (config r) = go fs rest n | importTree (config r) = go fs rest n + | thirdPartyPopulated (remotetype r) = go fs rest n | checkcopies n (Just $ Remote.uuid r) = dropr fs r n >>= go fs rest | otherwise = pure n diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs index d7c5819951..34e34073ba 100644 --- a/Assistant/DaemonStatus.hs +++ b/Assistant/DaemonStatus.hs @@ -57,7 +57,8 @@ calcSyncRemotes = do contentremotes <- filterM (not <$$> liftIO . getDynamicConfig . remoteAnnexIgnore . Remote.gitconfig) $ filter (\r -> Remote.uuid r /= NoUUID) syncable let (exportremotes, nonexportremotes) = partition (exportTree . Remote.config) contentremotes - let dataremotes = filter (not . importTree . Remote.config) nonexportremotes + let isimport r = importTree (Remote.config r) || Remote.thirdPartyPopulated (Remote.remotetype r) + let dataremotes = filter (not . isimport) nonexportremotes return $ \dstatus -> dstatus { syncRemotes = syncable diff --git a/Command/Sync.hs b/Command/Sync.hs index b4154b798d..613afe8639 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -212,8 +212,9 @@ seek' o = do dataremotes <- filter (\r -> Remote.uuid r /= NoUUID) <$> filterM (not <$$> liftIO . getDynamicConfig . remoteAnnexIgnore . Remote.gitconfig) remotes let (exportremotes, nonexportremotes) = partition (exportTree . Remote.config) dataremotes - let importremotes = filter (importTree . Remote.config) dataremotes - let keyvalueremotes = filter (not . importTree . Remote.config) nonexportremotes + let isimport r = importTree (Remote.config r) || Remote.thirdPartyPopulated (Remote.remotetype r) + let importremotes = filter isimport dataremotes + let keyvalueremotes = filter (not . isimport) nonexportremotes if cleanupOption o then do -- 2.30.2