make retrieveKeyFile and retrieveKeyFileCheap throw exceptions
Converted retrieveKeyFileCheap to a Maybe, to avoid needing to throw a exception when a remote doesn't support it.
This commit is contained in:
parent
a6adea4aaf
commit
d9c7f81ba4
32 changed files with 247 additions and 245 deletions
|
@ -70,8 +70,8 @@ gen r u rc gc rs = do
|
|||
, cost = cst
|
||||
, name = Git.repoDescribe r
|
||||
, storeKey = storeKeyDummy
|
||||
, retrieveKeyFile = retreiveKeyFileDummy
|
||||
, retrieveKeyFileCheap = retrieveCheap buprepo
|
||||
, retrieveKeyFile = retrieveKeyFileDummy
|
||||
, retrieveKeyFileCheap = Nothing
|
||||
-- Bup uses git, which cryptographically verifies content
|
||||
-- (with SHA1, but sufficiently for this).
|
||||
, retrievalSecurityPolicy = RetrievalAllKeysSecure
|
||||
|
@ -169,9 +169,6 @@ retrieve buprepo = byteRetriever $ \k sink -> do
|
|||
liftIO (hClose h >> forceSuccessProcess p pid)
|
||||
`after` (sink =<< liftIO (L.hGetContents h))
|
||||
|
||||
retrieveCheap :: BupRepo -> Key -> AssociatedFile -> FilePath -> Annex Bool
|
||||
retrieveCheap _ _ _ _ = return False
|
||||
|
||||
{- Cannot revert having stored a key in bup, but at least the data for the
|
||||
- key will be used for deltaing data of other keys stored later.
|
||||
-
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue