better indicate when special remotes do not support renameExport
Avoid a warning message when renameExport is not supported, and just fallback to deleting with a subsequent re-upload. Especially needed for importtree remotes, where renameExport needs to be disabled. This changes the external special remote protocol, but in a backwards-compatible way. A reply of UNSUPPORTED-REQUEST to an older version of git-annex will cause it to make renameExport return False.
This commit is contained in:
parent
c755788256
commit
2912429640
11 changed files with 62 additions and 53 deletions
|
@ -43,7 +43,7 @@ instance HasExportUnsupported (ExportActions Annex) where
|
|||
, checkPresentExport = \_ _ -> return False
|
||||
, removeExport = \_ _ -> return False
|
||||
, removeExportDirectory = Just $ \_ -> return False
|
||||
, renameExport = \_ _ _ -> return False
|
||||
, renameExport = \_ _ _ -> return Nothing
|
||||
}
|
||||
|
||||
-- | Use for remotes that do not support imports.
|
||||
|
@ -170,7 +170,7 @@ adjustExportImport r = case M.lookup "exporttree" (config r) of
|
|||
-- lose modifications to the file
|
||||
-- (by eg copying and then deleting)
|
||||
-- so don't use it
|
||||
, renameExport = \_ _ _ -> return False
|
||||
, renameExport = \_ _ _ -> return Nothing
|
||||
, checkPresentExport = checkpresent
|
||||
}
|
||||
, checkPresent = if appendonly r'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue