diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-10-26 15:38:22 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-10-26 15:38:27 -0400 |
commit | c6122cf0a40ce4c565957f68e1076b6ada5c2bea (patch) | |
tree | b2b2a4e52a48d79e3984b5e39672d738d2dbfa8d /Remote | |
parent | 85cb9ac4ab6844166e539ddc6b15922f79c74a19 (diff) |
enable forwardRetry for command-line transfers
If a transfer fails for some reason, but some data managed to be sent, the
transfer will be retried. (The assistant already did this.)
Possible impacts:
* More ssh prompts if ssh needs to prompt for a password to connect to a
host, or is prompting about some other problem like a ssh key mismatch.
* More data transfer due to retrying, epecially when a remote does not
support resuming a transfer.
In the worst case, a lot of data will be transferred but it fails before
the end, and then all that data gets transferred again plus one byte more;
repeat until it manages to get the whole file.
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Git.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs index ff5e733ce..34bdd83a1 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -439,7 +439,7 @@ copyFromRemote' r key file dest meterupdate Just (object, checksuccess) -> do copier <- mkCopier hardlink params runTransfer (Transfer Download u key) - file noRetry + file forwardRetry (\p -> copier object dest (combineMeterUpdate p meterupdate) checksuccess) | Git.repoIsSsh (repo r) = unVerified $ feedprogressback $ \p -> do Ssh.rsyncHelper (Just (combineMeterUpdate meterupdate p)) @@ -565,7 +565,7 @@ copyToRemote' r key file meterupdate ensureInitialized copier <- mkCopier hardlink params let verify = Annex.Content.RemoteVerify r - runTransfer (Transfer Download u key) file noRetry $ \p -> + runTransfer (Transfer Download u key) file forwardRetry $ \p -> let p' = combineMeterUpdate meterupdate p in Annex.Content.saveState True `after` Annex.Content.getViaTmp verify key |