diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-10-09 13:07:03 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-10-09 13:12:58 -0400 |
commit | 8817fe6331ffc3d99bbf44af559f773af1a2ddd2 (patch) | |
tree | 21da807bf1ae9dda9714990b5d6c0dd961bd4ff6 /Types | |
parent | 7788d302397096c85fe70c35f2661d76a8d2f511 (diff) |
content locking during drop working for local git remotes
Only ssh remotes lack locking now
Diffstat (limited to 'Types')
-rw-r--r-- | Types/NumCopies.hs | 2 | ||||
-rw-r--r-- | Types/Remote.hs | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Types/NumCopies.hs b/Types/NumCopies.hs index 23df6610a..476c33058 100644 --- a/Types/NumCopies.hs +++ b/Types/NumCopies.hs @@ -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. -} diff --git a/Types/Remote.hs b/Types/Remote.hs index 511a85afa..a39324163 100644 --- a/Types/Remote.hs +++ b/Types/Remote.hs @@ -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, |