summaryrefslogtreecommitdiff
path: root/Types
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-09-06 15:33:40 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-09-06 15:44:10 -0400
commit6fcefbdb6629c3e94c41bc05a6b7c224ade99ba0 (patch)
treedba0a4b10efa30c3fe491c5163a2942eda56eb69 /Types
parent9dd2651e8e5efbbf3a9cc59cab3afa1fef7446f2 (diff)
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.
Diffstat (limited to 'Types')
-rw-r--r--Types/Remote.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Types/Remote.hs b/Types/Remote.hs
index 46750ee8d..6f0a312f4 100644
--- a/Types/Remote.hs
+++ b/Types/Remote.hs
@@ -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
}