External special remote protocol now includes commands for setting and getting the urls associated with a key.

This commit is contained in:
Joey Hess 2014-12-08 13:32:27 -04:00
parent 689acbca99
commit 8093008ef4
6 changed files with 30 additions and 3 deletions

View file

@ -9,6 +9,7 @@ module Logs.Web (
URLString,
webUUID,
getUrls,
getUrlsWithPrefix,
setUrlPresent,
setUrlMissing,
knownUrls,
@ -46,6 +47,9 @@ getUrls key = go $ urlLogFile key : oldurlLogs key
then go ls
else return us
getUrlsWithPrefix :: Key -> String -> Annex [URLString]
getUrlsWithPrefix key prefix = filter (prefix `isPrefixOf`) <$> getUrls key
setUrlPresent :: Key -> URLString -> Annex ()
setUrlPresent key url = do
us <- getUrls key