fromkey, registerurl: Allow urls to be specified instead of keys, and generate URL keys.
This is especially useful because the caller doesn't need to generate valid url keys, which involves some escaping of characters, and may involve taking a md5sum of the url if it's too long.
This commit is contained in:
parent
7267af5c50
commit
77c43a388e
9 changed files with 41 additions and 14 deletions
|
@ -31,8 +31,8 @@ backend = Backend
|
|||
}
|
||||
|
||||
{- Every unique url has a corresponding key. -}
|
||||
fromUrl :: String -> Maybe Integer -> Annex Key
|
||||
fromUrl url size = return $ stubKey
|
||||
fromUrl :: String -> Maybe Integer -> Key
|
||||
fromUrl url size = stubKey
|
||||
{ keyName = genKeyName url
|
||||
, keyBackendName = "URL"
|
||||
, keySize = size
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue