summaryrefslogtreecommitdiff
path: root/Remote/External.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-08-29 13:00:41 -0400
committerJoey Hess <joeyh@joeyh.name>2017-08-29 13:00:41 -0400
commite55e445a36b3c656113c4b20e947a67cd460c496 (patch)
treed97e92052bc32c5c953d404968f68d928158028f /Remote/External.hs
parent6ae9d8fe4992a83cf2a0f2916283ac2407baef37 (diff)
add API for exporting
Implemented so far for the directory special remote. Several remotes don't make sense to export to. Regular Git remotes, obviously, do not. Bup remotes almost certianly do not, since bup would need to be used to extract the export; same store for Ddar. Web and Bittorrent are download-only. GCrypt is always encrypted so exporting to it would be pointless. There's probably no point complicating the Hook remotes with exporting at this point. External, S3, Glacier, WebDAV, Rsync, and possibly Tahoe should be modified to support export. Thought about trying to reuse the storeKey/retrieveKeyFile/removeKey interface, rather than adding a new interface. But, it seemed better to keep it separate, to avoid a complicated interface that sometimes encrypts/chunks key/value storage and sometimes users non-key/value storage. Any common parts can be factored out. Note that storeExport is not atomic. doc/design/exporting_trees_to_special_remotes.mdwn has some things in the "resuming exports" section that bear on this decision. Basically, I don't think, at this time, that an atomic storeExport would help with resuming, because exports are not key/value storage, and we can't be sure that a partially uploaded file is the same content we're currently trying to export. Also, note that ExportLocation will always use unix path separators. This is important, because users may export from a mix of windows and unix, and it avoids complicating the API with path conversions, and ensures that in such a mix, they always use the same locations for exports. This commit was sponsored by Bruno BEAUFILS on Patreon.
Diffstat (limited to 'Remote/External.hs')
-rw-r--r--Remote/External.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Remote/External.hs b/Remote/External.hs
index 32b95e9bb3..dd62c1539e 100644
--- a/Remote/External.hs
+++ b/Remote/External.hs
@@ -85,6 +85,11 @@ gen r u c gc
, lockContent = Nothing
, checkPresent = checkPresentDummy
, checkPresentCheap = False
+ , storeExport = Nothing
+ , retrieveExport = Nothing
+ , removeExport = Nothing
+ , checkPresentExport = Nothing
+ , renameExport = Nothing
, whereisKey = towhereis
, remoteFsck = Nothing
, repairRepo = Nothing