safer inannex checking
git-annex-shell inannex now returns always 0, 1, or 100 (the last when it's unclear if content is currently in the index due to it currently being moved or dropped). (Actual locking code still not yet written.)
This commit is contained in:
parent
2934a65ac5
commit
d3e1a3619f
14 changed files with 93 additions and 50 deletions
|
@ -9,7 +9,6 @@
|
|||
|
||||
module Types.Remote where
|
||||
|
||||
import Control.Exception
|
||||
import Data.Map as M
|
||||
import Data.Ord
|
||||
|
||||
|
@ -46,8 +45,8 @@ data Remote a = Remote {
|
|||
-- removes a key's contents
|
||||
removeKey :: Key -> a Bool,
|
||||
-- Checks if a key is present in the remote; if the remote
|
||||
-- cannot be accessed returns a Left error.
|
||||
hasKey :: Key -> a (Either IOException Bool),
|
||||
-- cannot be accessed returns a Left error message.
|
||||
hasKey :: Key -> a (Either String Bool),
|
||||
-- Some remotes can check hasKey without an expensive network
|
||||
-- operation.
|
||||
hasKeyCheap :: Bool,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue