Special remotes now all rollback storage of keys that get modified during the transfer, which can happen in direct mode.
This commit is contained in:
parent
b3559d8eae
commit
1bc49b7158
11 changed files with 63 additions and 44 deletions
|
@ -24,11 +24,16 @@ seek = [withKeys start]
|
|||
start :: Key -> CommandStart
|
||||
start key = ifM (inAnnex key)
|
||||
( fieldTransfer Upload key $ \_p ->
|
||||
sendAnnex key $ liftIO . rsyncServerSend
|
||||
sendAnnex key rollback $ liftIO . rsyncServerSend
|
||||
, do
|
||||
warning "requested key is not present"
|
||||
liftIO exitFailure
|
||||
)
|
||||
where
|
||||
{- No need to do any rollback; when sendAnnex fails, a nonzero
|
||||
- exit will be propigated, and the remote will know the transfer
|
||||
- failed. -}
|
||||
rollback = noop
|
||||
|
||||
fieldTransfer :: Direction -> Key -> (MeterUpdate -> Annex Bool) -> CommandStart
|
||||
fieldTransfer direction key a = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue