diff --git a/Annex/Drop.hs b/Annex/Drop.hs index 2ad9c78d49..1a6af18586 100644 --- a/Annex/Drop.hs +++ b/Annex/Drop.hs @@ -30,7 +30,7 @@ type Reason = String - and numcopies settings. - - Skips trying to drop from remotes that are appendonly, since those drops - - would presumably fail. Also skips dropping from exporttree remotes, + - would presumably fail. Also skips dropping from exporttree/importtree remotes, - which don't allow dropping individual keys. - - The UUIDs are ones where the content is believed to be present. @@ -87,6 +87,7 @@ handleDropsFrom locs rs reason fromhere key afile si preverified runner = do | uuid r `S.notMember` slocs = go fs rest n | appendonly r = go fs rest n | exportTree (config r) = go fs rest n + | importTree (config 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 27b5a7242e..d7c5819951 100644 --- a/Assistant/DaemonStatus.hs +++ b/Assistant/DaemonStatus.hs @@ -56,7 +56,8 @@ calcSyncRemotes = do let syncable = filter good rs contentremotes <- filterM (not <$$> liftIO . getDynamicConfig . remoteAnnexIgnore . Remote.gitconfig) $ filter (\r -> Remote.uuid r /= NoUUID) syncable - let (exportremotes, dataremotes) = partition (exportTree . Remote.config) contentremotes + let (exportremotes, nonexportremotes) = partition (exportTree . Remote.config) contentremotes + let dataremotes = filter (not . importTree . Remote.config) nonexportremotes return $ \dstatus -> dstatus { syncRemotes = syncable diff --git a/Command/Sync.hs b/Command/Sync.hs index 1f1afc9c13..59c5be2427 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -210,8 +210,9 @@ seek' o = do let gitremotes = filter (Remote.gitSyncableRemoteType . Remote.remotetype) remotes dataremotes <- filter (\r -> Remote.uuid r /= NoUUID) <$> filterM (not <$$> liftIO . getDynamicConfig . remoteAnnexIgnore . Remote.gitconfig) remotes - let (exportremotes, keyvalueremotes) = partition (exportTree . Remote.config) dataremotes + let (exportremotes, nonexportremotes) = partition (exportTree . Remote.config) dataremotes let importremotes = filter (importTree . Remote.config) dataremotes + let keyvalueremotes = partition (not . importTree . Remote.config) nonexportremotes if cleanupOption o then do diff --git a/doc/todo/assistant_importtree.mdwn b/doc/todo/assistant_importtree.mdwn new file mode 100644 index 0000000000..a8ee54d33b --- /dev/null +++ b/doc/todo/assistant_importtree.mdwn @@ -0,0 +1,2 @@ +The assistant currently will export to exporttree=yes remotes, but it will +not import from importtree=yes remotes.