added retrieveKeyFileInOrder and ORDERED to external special remote protocol
I anticipate lots of external special remote programs will neglect implementing this. Still, it's the right thing to do to assume that some of them may write files out of order. Probably most external special remotes will not be used with a proxy. When someone is using one with a proxy, they can always get it fixed to send ORDERED.
This commit is contained in:
parent
f920d90781
commit
d9b4bf4224
28 changed files with 80 additions and 13 deletions
6
Remote/External/Types.hs
vendored
6
Remote/External/Types.hs
vendored
|
@ -168,6 +168,7 @@ data Request
|
|||
| INITREMOTE
|
||||
| GETCOST
|
||||
| GETAVAILABILITY
|
||||
| GETORDERED
|
||||
| CLAIMURL URLString
|
||||
| CHECKURL URLString
|
||||
| TRANSFER Direction SafeKey FilePath
|
||||
|
@ -200,6 +201,7 @@ instance Proto.Sendable Request where
|
|||
formatMessage INITREMOTE = ["INITREMOTE"]
|
||||
formatMessage GETCOST = ["GETCOST"]
|
||||
formatMessage GETAVAILABILITY = ["GETAVAILABILITY"]
|
||||
formatMessage GETORDERED = ["GETORDERED"]
|
||||
formatMessage (CLAIMURL url) = [ "CLAIMURL", Proto.serialize url ]
|
||||
formatMessage (CHECKURL url) = [ "CHECKURL", Proto.serialize url ]
|
||||
formatMessage (TRANSFER direction key file) =
|
||||
|
@ -248,6 +250,8 @@ data Response
|
|||
| REMOVE_FAILURE Key ErrorMsg
|
||||
| COST Cost
|
||||
| AVAILABILITY Availability
|
||||
| ORDERED
|
||||
| UNORDERED
|
||||
| INITREMOTE_SUCCESS
|
||||
| INITREMOTE_FAILURE ErrorMsg
|
||||
| CLAIMURL_SUCCESS
|
||||
|
@ -284,6 +288,8 @@ instance Proto.Receivable Response where
|
|||
parseCommand "REMOVE-FAILURE" = Proto.parse2 REMOVE_FAILURE
|
||||
parseCommand "COST" = Proto.parse1 COST
|
||||
parseCommand "AVAILABILITY" = Proto.parse1 AVAILABILITY
|
||||
parseCommand "ORDERED" = Proto.parse0 ORDERED
|
||||
parseCommand "UNORDERED" = Proto.parse0 UNORDERED
|
||||
parseCommand "INITREMOTE-SUCCESS" = Proto.parse0 INITREMOTE_SUCCESS
|
||||
parseCommand "INITREMOTE-FAILURE" = Proto.parse1 INITREMOTE_FAILURE
|
||||
parseCommand "CLAIMURL-SUCCESS" = Proto.parse0 CLAIMURL_SUCCESS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue