make the assistant retry failed transfers

When a transfer fails, the progress info can be used to intelligently
retry it. If the transfer managed to make some progress, but did not
fully complete, then there's a good chance that a retry will finish it
(or at least make more progress).
This commit is contained in:
Joey Hess 2012-09-23 13:27:13 -04:00
parent d4055b3dd2
commit df07ccf404
6 changed files with 37 additions and 17 deletions

View file

@ -247,7 +247,7 @@ copyFromRemote r key file dest
liftIO $ onLocal r $ do
ensureInitialized
loc <- inRepo $ gitAnnexLocation key
upload u key file $
upload u key file noRetry $
rsyncOrCopyFile params loc dest
| Git.repoIsSsh r = feedprogressback $ \feeder ->
rsyncHelper (Just feeder)
@ -317,7 +317,7 @@ copyToRemote r key file p
( return False
, do
ensureInitialized
download u key file $
download u key file noRetry $
Annex.Content.saveState True `after`
Annex.Content.getViaTmp key
(\d -> rsyncOrCopyFile params keysrc d p)