Merge branch 'master' into borg

This commit is contained in:
Joey Hess 2020-12-18 15:27:24 -04:00
commit 909318dcee
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 16 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -211,8 +211,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

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="Ilya_Shlyakhter"
avatar="http://cdn.libravatar.org/avatar/1647044369aa7747829c38b9dcc84df0"
subject="encryption=onlycreds"
date="2020-12-17T21:01:33Z"
content="""
If [[todo/encrypt_only_the_credentials]] gets implemented, then one form of `encryption=` (`encryption=onlycreds`) would be ok for export remotes.
"""]]

View file

@ -0,0 +1,2 @@
The assistant currently will export to exporttree=yes remotes, but it will
not import from importtree=yes remotes.