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:
parent
5c8150c6eb
commit
7d9f0e0fbe
9 changed files with 59 additions and 8 deletions
|
@ -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")
|
||||
|
||||
|
|
2
Remote/External/Types.hs
vendored
2
Remote/External/Types.hs
vendored
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue