support thirdPartyPopulated
authorJoey Hess <joeyh@joeyh.name>
Mon, 21 Dec 2020 17:46:04 +0000 (13:46 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 21 Dec 2020 17:49:47 +0000 (13:49 -0400)
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
Assistant/DaemonStatus.hs
Command/Sync.hs

index 1a6af18586be78f4c17fcf043c8aacebdd4cc8f3..fca96c15304439bf9a13c49b65d5a42150c03a45 100644 (file)
@@ -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
index d7c58199518bf598d65ed743b22f288255a0f2cb..34e34073ba4841ff1836c5cbf562fcc6f83211d2 100644 (file)
@@ -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
index b4154b798d4cebd36a7908f139c06238d8262f34..613afe8639dcaa438ace9f74e76b3c3e9ad56689 100644 (file)
@@ -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