From 96b0e3d6e9d6050c02b669ea2a1c168f05c40890 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 24 Sep 2012 13:36:05 -0400 Subject: [PATCH] quiet calls to transferkey --- Assistant/Threads/Transferrer.hs | 1 + Command/TransferKey.hs | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Assistant/Threads/Transferrer.hs b/Assistant/Threads/Transferrer.hs index 8e2b672438..fe06d5fa1d 100644 --- a/Assistant/Threads/Transferrer.hs +++ b/Assistant/Threads/Transferrer.hs @@ -74,6 +74,7 @@ startTransfer st dstatus program t info = case (transferRemote info, associatedF where params = [ Param "transferkey" + , Param "--quiet" , Param $ key2file $ transferKey t , Param $ if isdownload then "--from" diff --git a/Command/TransferKey.hs b/Command/TransferKey.hs index a308e01754..28ace3cd22 100644 --- a/Command/TransferKey.hs +++ b/Command/TransferKey.hs @@ -42,7 +42,7 @@ start to from file key = _ -> error "specify either --from or --to" toPerform :: Remote -> Key -> AssociatedFile -> CommandPerform -toPerform remote key file = next $ +toPerform remote key file = go $ upload (uuid remote) key file forwardRetry $ \p -> do ok <- Remote.storeKey remote key file p when ok $ @@ -50,6 +50,9 @@ toPerform remote key file = next $ return ok fromPerform :: Remote -> Key -> AssociatedFile -> CommandPerform -fromPerform remote key file = next $ +fromPerform remote key file = go $ download (uuid remote) key file forwardRetry $ getViaTmp key $ Remote.retrieveKeyFile remote key file + +go :: Annex Bool -> CommandPerform +go a = ifM a ( liftIO exitSuccess, liftIO exitFailure)