External special remote protocol now includes commands for setting and getting the urls associated with a key.
This commit is contained in:
parent
689acbca99
commit
8093008ef4
6 changed files with 30 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue