avoid sync/assistant drop from appendonly

Make git-annex sync and the assistant skip trying to drop from appendonly
remotes since it's just going to fail.

git-annex drop and similar commands will still try to drop from
appendonly, so the user will see failure messages when they try to do
that. To do otherwise would be confusing since the user has explicitly
asked for a drop with those commands.

This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
Joey Hess 2018-08-30 11:23:57 -04:00
parent 8b39db20b5
commit 76f32012af
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 9 additions and 5 deletions

View file

@ -285,10 +285,10 @@ cleanupUnexport r ea db eks loc = do
removeExportedLocation db (asKey ek) loc
flushDbQueue db
-- A readonly remote can support removeExportLocation to remove
-- An appendonly remote can support removeExportLocation to remove
-- the file from the exported tree, but still retain the content
-- and allow retrieving it.
unless (Remote.readonly) $ do
unless (appendonly r) $ do
remaininglocs <- liftIO $
concat <$> forM eks (\ek -> getExportedLocation db (asKey ek))
when (null remaininglocs) $