aboutsummaryrefslogtreecommitdiff
path: root/Command/SendKey.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-12-08 17:03:39 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-12-08 17:03:39 -0400
commite2dd3ae351cbe7b2b1a027ef257808dde02d899f (patch)
treeb8bf1c308dc9ea3fbc80db47921a2b3eb6c5a89b /Command/SendKey.hs
parent0c7ac5732d8bece6ba259bfa31e383612f3fb8df (diff)
Got object sending working in direct mode.
However, I don't yet have a reliable way to deal with files being modified while they're being transferred. I have code that detects it on the sending side, but the receiver is still free to move the wrong content into its annex, and record that it has the content. So that's not acceptable, and I'll need to work on it some more. However, at this point I can use a direct mode repository as a remote and transfer files from and to it.
Diffstat (limited to 'Command/SendKey.hs')
-rw-r--r--Command/SendKey.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Command/SendKey.hs b/Command/SendKey.hs
index ccbfa9030..82c159f66 100644
--- a/Command/SendKey.hs
+++ b/Command/SendKey.hs
@@ -23,9 +23,8 @@ seek = [withKeys start]
start :: Key -> CommandStart
start key = ifM (inAnnex key)
- ( fieldTransfer Upload key $ \_p -> do
- file <- inRepo $ gitAnnexLocation key
- liftIO $ rsyncServerSend file
+ ( fieldTransfer Upload key $ \_p ->
+ sendAnnex key $ liftIO . rsyncServerSend
, do
warning "requested key is not present"
liftIO exitFailure