summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Annex/Transfer.hs6
-rw-r--r--CHANGELOG3
-rw-r--r--Command/TransferKeys.hs7
-rw-r--r--doc/todo/__34__copy_--failed__34__/comment_1_ff81023df39f9faac5935f6417ad2b38._comment4
4 files changed, 12 insertions, 8 deletions
diff --git a/Annex/Transfer.hs b/Annex/Transfer.hs
index 55a8d39f7..90aaa59c9 100644
--- a/Annex/Transfer.hs
+++ b/Annex/Transfer.hs
@@ -94,8 +94,12 @@ runTransfer' ignorelock t file shouldretry transferobserver transferaction = do
return observeFailure
else do
v <- retry info metervar $ transferaction meter
+ let ok = observeBool v
liftIO $ cleanup tfile lck
- transferobserver (observeBool v) t info
+ if ok
+ then removeFailedTransfer t
+ else recordFailedTransfer t info
+ transferobserver ok t info
return v
where
#ifndef mingw32_HOST_OS
diff --git a/CHANGELOG b/CHANGELOG
index bb8705a39..80e63bb43 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -22,6 +22,9 @@ git-annex (6.20160726) UNRELEASED; urgency=medium
the content is present locally.
* get, move, copy, mirror: Added --failed switch which retries
failed copies/moves.
+ * Re-enable accumulating transfer failure log files for command-line
+ actions (disabled in 5.20150522), and remove the log files after
+ successful transfers.
-- Joey Hess <id@joeyh.name> Wed, 20 Jul 2016 12:03:15 -0400
diff --git a/Command/TransferKeys.hs b/Command/TransferKeys.hs
index 82dc15032..a385e5cda 100644
--- a/Command/TransferKeys.hs
+++ b/Command/TransferKeys.hs
@@ -35,13 +35,13 @@ start = do
where
runner (TransferRequest direction remote key file)
| direction == Upload = notifyTransfer direction file $
- upload (Remote.uuid remote) key file forwardRetry observer $ \p -> do
+ upload (Remote.uuid remote) key file forwardRetry noObserver $ \p -> do
ok <- Remote.storeKey remote key file p
when ok $
Remote.logStatus remote key InfoPresent
return ok
| otherwise = notifyTransfer direction file $
- download (Remote.uuid remote) key file forwardRetry observer $ \p ->
+ download (Remote.uuid remote) key file forwardRetry noObserver $ \p ->
getViaTmp (RemoteVerify remote) key $ \t -> do
r <- Remote.retrieveKeyFile remote key file t p
-- Make sure we get the current
@@ -49,9 +49,6 @@ start = do
-- not old cached data.
Database.Keys.closeDb
return r
-
- observer False t tinfo = recordFailedTransfer t tinfo
- observer True _ _ = noop
runRequests
:: Handle
diff --git a/doc/todo/__34__copy_--failed__34__/comment_1_ff81023df39f9faac5935f6417ad2b38._comment b/doc/todo/__34__copy_--failed__34__/comment_1_ff81023df39f9faac5935f6417ad2b38._comment
index d0f49a54a..b17372714 100644
--- a/doc/todo/__34__copy_--failed__34__/comment_1_ff81023df39f9faac5935f6417ad2b38._comment
+++ b/doc/todo/__34__copy_--failed__34__/comment_1_ff81023df39f9faac5935f6417ad2b38._comment
@@ -3,6 +3,6 @@
subject="""comment 1"""
date="2016-08-03T15:07:43Z"
content="""
-Nice idea, and there's already a log of recent failed transfers that
-could be used.
+Nice idea, and there's already an implementation of a log of recent failed
+transfers that the assistant uses, that can be reused for this.
"""]]