aboutsummaryrefslogtreecommitdiff
path: root/Command/SendKey.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-08-13 16:13:16 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-08-13 16:13:16 -0400
commitd2c3cb1c2e08a07c7c03776d1c19617f28ddc0c0 (patch)
treeac55b291f008f8dccff428b8220e0f86d64f7972 /Command/SendKey.hs
parent7ac44206f2acda5721c88e4f5dd1f09384f9f05e (diff)
add some debugs to get timings
Note that I had one in Annex.Action.startup too, but it resulted in a weird message printed by ssh, "channel 2: bad ext data". I don't know why, but it only happened when transferinfo was run, so I wonder if 1d71ad072e13c8ed1cb8b34367b57d59e651f0a9 introduced a fragility somehow.
Diffstat (limited to 'Command/SendKey.hs')
-rw-r--r--Command/SendKey.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Command/SendKey.hs b/Command/SendKey.hs
index da7f99889..3b1cafb42 100644
--- a/Command/SendKey.hs
+++ b/Command/SendKey.hs
@@ -16,6 +16,8 @@ import Annex.Transfer
import qualified CmdLine.GitAnnexShell.Fields as Fields
import Utility.Metered
+import System.Log.Logger
+
cmd :: Command
cmd = noCommit $
command "sendkey" SectionPlumbing
@@ -44,10 +46,12 @@ start key = do
fieldTransfer :: Direction -> Key -> (MeterUpdate -> Annex Bool) -> CommandStart
fieldTransfer direction key a = do
+ liftIO $ debugM "fieldTransfer" "transfer start"
afile <- Fields.getField Fields.associatedFile
ok <- maybe (a $ const noop)
(\u -> runner (Transfer direction (toUUID u) key) afile noRetry noObserver a)
=<< Fields.getField Fields.remoteUUID
+ liftIO $ debugM "fieldTransfer" "transfer done"
liftIO $ exitBool ok
where
{- Allow the key to be sent to the remote even if there seems to be