export file renaming
This is seriously super hairy. It has to handle interrupted exports, which may be resumed with the same or a different tree. It also has to recover from export conflicts, which could cause the wrong content to be renamed to a file. I think this works, or is close to working. See the update to the design for how it works. This is definitely not optimal, in that it does more renames than are necessary. It would probably be worth finding the keys that are really renamed and only renaming those. But let's get the "simple" approach to work first.. This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
parent
0fa948b402
commit
cae3704a44
4 changed files with 189 additions and 41 deletions
|
@ -178,5 +178,7 @@ data ExportActions a = ExportActions
|
|||
-- Throws an exception if the remote cannot be accessed.
|
||||
, checkPresentExport :: Key -> ExportLocation -> a Bool
|
||||
-- Renames an already exported file.
|
||||
-- This may fail, if the file doesn't exist, or the remote does not
|
||||
-- support renames.
|
||||
, renameExport :: Key -> ExportLocation -> ExportLocation -> a Bool
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue