refactoring
This is groundwork for using git-annex transferkeys to run transfers, in order to allow stalled transfers to be interrupted and retried. The new upload and download are closer to what git-annex transferkeys does, so the plan is to make them use it. Then things that were left using upload' and download' won't recover from stalls. Notably, that includes import and export. But at least get/move/copy will be able to. (Also the assistant hopefully, but not yet.) This commit was sponsored by Jake Vosloo on Patreon.
This commit is contained in:
parent
a0e1650a15
commit
4c47568876
11 changed files with 58 additions and 46 deletions
|
@ -9,7 +9,6 @@ module Command.Get where
|
|||
|
||||
import Command
|
||||
import qualified Remote
|
||||
import Annex.Content
|
||||
import Annex.Transfer
|
||||
import Annex.NumCopies
|
||||
import Annex.Wanted
|
||||
|
@ -114,10 +113,6 @@ getKey' key afile = dispatch
|
|||
| Remote.hasKeyCheap r =
|
||||
either (const False) id <$> Remote.hasKey r key
|
||||
| otherwise = return True
|
||||
docopy r witness = getViaTmp (Remote.retrievalSecurityPolicy r) (RemoteVerify r) key afile $ \dest ->
|
||||
download (Remote.uuid r) key afile stdRetry
|
||||
(\p -> do
|
||||
showAction $ "from " ++ Remote.name r
|
||||
Remote.verifiedAction $
|
||||
Remote.retrieveKeyFile r key afile (fromRawFilePath dest) p
|
||||
) witness
|
||||
docopy r witness = do
|
||||
showAction $ "from " ++ Remote.name r
|
||||
download r key afile stdRetry witness
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue