Added INFO to external special remote protocol.

It's left up to the special remote to detect when git-annex is new enough
to support the message; an old git-annex will blow up.

This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
Joey Hess 2018-02-06 13:03:55 -04:00
parent 5c8150c6eb
commit 7d9f0e0fbe
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
9 changed files with 59 additions and 8 deletions

View file

@ -421,6 +421,7 @@ handleRequest' st external req mp responsehandler
mapM_ (send . VALUE) =<< getUrlsWithPrefix key prefix
send (VALUE "") -- end of list
handleRemoteRequest (DEBUG msg) = liftIO $ debugM "external" msg
handleRemoteRequest (INFO msg) = showInfo msg
handleRemoteRequest (VERSION _) =
sendMessage st external (ERROR "too late to send VERSION")

View file

@ -253,6 +253,7 @@ data RemoteRequest
| SETURIMISSING Key URI
| GETURLS Key String
| DEBUG String
| INFO String
deriving (Show)
instance Proto.Receivable RemoteRequest where
@ -276,6 +277,7 @@ instance Proto.Receivable RemoteRequest where
parseCommand "SETURIMISSING" = Proto.parse2 SETURIMISSING
parseCommand "GETURLS" = Proto.parse2 GETURLS
parseCommand "DEBUG" = Proto.parse1 DEBUG
parseCommand "INFO" = Proto.parse1 INFO
parseCommand _ = Proto.parseFail
-- Responses to RemoteRequest.