content locking during drop working for local git remotes
Only ssh remotes lack locking now
This commit is contained in:
parent
ceb5819538
commit
4c6095b6f5
4 changed files with 52 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
{- git-annex numcopies types
|
||||
-
|
||||
- Copyright 2014 Joey Hess <id@joeyh.name>
|
||||
- Copyright 2014-2015 Joey Hess <id@joeyh.name>
|
||||
-
|
||||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
|
|
@ -78,10 +78,11 @@ data RemoteA a = Remote {
|
|||
-- Removes a key's contents (succeeds if the contents are not present)
|
||||
removeKey :: Key -> a Bool,
|
||||
-- Uses locking to prevent removal of a key's contents,
|
||||
-- thus producing a VerifiedCopy.
|
||||
-- The action must be run whether or not the locking succeeds.
|
||||
-- thus producing a VerifiedCopy, which is passed to the callback.
|
||||
-- If unable to lock, does not run the callback, and throws an
|
||||
-- error.
|
||||
-- This is optional; remotes do not have to support locking.
|
||||
lockContent :: forall r. Maybe (Key -> (Maybe VerifiedCopy -> a r) -> a r),
|
||||
lockContent :: forall r. Maybe (Key -> (VerifiedCopy -> a r) -> a r),
|
||||
-- Checks if a key is present in the remote.
|
||||
-- Throws an exception if the remote cannot be accessed.
|
||||
checkPresent :: Key -> a Bool,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue