support incremental verification when retrieving from export/import remotes
None of the special remotes do it yet, but this lays the groundwork. Added MustFinishIncompleteVerify so that, when an incremental verify is started but not complete, it can be forced to finish it. Otherwise, it would have skipped doing it when verification is disabled, but verification must always be done when retrievin from export remotes since files can be modified during retrieval. Note that retrieveExportWithContentIdentifier doesn't support incremental verification yet. And I'm not sure if it can -- it doesn't know the Key before it downloads the content. It seems a new API call would need to be split out of that, which is provided with the key. Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
parent
52b768db45
commit
90950a37e5
11 changed files with 42 additions and 22 deletions
|
@ -120,9 +120,10 @@ downloadKey baseurl ll key _af dest p vc = do
|
|||
downloadAction dest p iv key (keyUrlAction baseurl ll key)
|
||||
snd <$> finishVerifyKeyContentIncrementally iv
|
||||
|
||||
retriveExportHttpAlso :: Maybe URLString -> Key -> ExportLocation -> FilePath -> MeterUpdate -> Annex ()
|
||||
retriveExportHttpAlso baseurl key loc dest p =
|
||||
retriveExportHttpAlso :: Maybe URLString -> Key -> ExportLocation -> FilePath -> MeterUpdate -> Annex Verification
|
||||
retriveExportHttpAlso baseurl key loc dest p = do
|
||||
downloadAction dest p Nothing key (exportLocationUrlAction baseurl loc)
|
||||
return UnVerified
|
||||
|
||||
downloadAction :: FilePath -> MeterUpdate -> Maybe IncrementalVerifier -> Key -> ((URLString -> Annex (Either String ())) -> Annex (Either String ())) -> Annex ()
|
||||
downloadAction dest p iv key run =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue