diff options
author | Joey Hess <joeyh@joeyh.name> | 2018-02-06 13:03:55 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2018-02-06 13:03:55 -0400 |
commit | 465da37961ea77a30363d2193e625c5781bd9302 (patch) | |
tree | 020054765eee8af0b03a131a16eff7c4f2c2688f /Remote | |
parent | 34276bb91c9a36854d215ae50bfba2e207a6e6a4 (diff) |
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.
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/External.hs | 1 | ||||
-rw-r--r-- | Remote/External/Types.hs | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/Remote/External.hs b/Remote/External.hs index 4220c47d7..5a1e7f210 100644 --- a/Remote/External.hs +++ b/Remote/External.hs @@ -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") diff --git a/Remote/External/Types.hs b/Remote/External/Types.hs index 77f3e837e..9e511e450 100644 --- a/Remote/External/Types.hs +++ b/Remote/External/Types.hs @@ -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. |