diff options
author | Joey Hess <joeyh@joeyh.name> | 2014-12-08 13:32:27 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2014-12-08 13:32:46 -0400 |
commit | 1285c91f8f9b3505b4c4137ee5d84c450468333b (patch) | |
tree | 087ed20920196ac85d5dca3127a63609eed4d254 /Logs/Web.hs | |
parent | 941844b60ffae1aeaf96f71eb1ac7d5c932b6621 (diff) |
External special remote protocol now includes commands for setting and getting the urls associated with a key.
Diffstat (limited to 'Logs/Web.hs')
-rw-r--r-- | Logs/Web.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Logs/Web.hs b/Logs/Web.hs index 1d16e10b3..f31215a4f 100644 --- a/Logs/Web.hs +++ b/Logs/Web.hs @@ -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 |