summaryrefslogtreecommitdiff
path: root/Command/Drop.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-09 18:33:15 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-09 18:33:15 -0400
commitd3e1a3619ff6939367f43cbd46131b7f60ef6bd0 (patch)
treebc7e29364f11d3369730b0b61ad58e942b95d1cf /Command/Drop.hs
parent2934a65ac5bbab5ac127c495c8c2492e729c2b67 (diff)
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.)
Diffstat (limited to 'Command/Drop.hs')
-rw-r--r--Command/Drop.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Command/Drop.hs b/Command/Drop.hs
index e81bd9d7d..44685ffcd 100644
--- a/Command/Drop.hs
+++ b/Command/Drop.hs
@@ -52,7 +52,7 @@ startRemote file numcopies key remote = do
next $ performRemote key numcopies remote
performLocal :: Key -> Maybe Int -> CommandPerform
-performLocal key numcopies = lockExclusive key $ do
+performLocal key numcopies = lockContent key $ do
(remotes, trusteduuids) <- Remote.keyPossibilitiesTrusted key
untrusteduuids <- trustGet UnTrusted
let tocheck = Remote.remotesWithoutUUID remotes (trusteduuids++untrusteduuids)
@@ -64,7 +64,7 @@ performLocal key numcopies = lockExclusive key $ do
else stop
performRemote :: Key -> Maybe Int -> Remote.Remote Annex -> CommandPerform
-performRemote key numcopies remote = lockExclusive key $ do
+performRemote key numcopies remote = lockContent key $ do
-- Filter the remote it's being dropped from out of the lists of
-- places assumed to have the key, and places to check.
-- When the local repo has the key, that's one additional copy.
@@ -95,7 +95,7 @@ cleanupRemote key remote ok = do
-- better safe than sorry: assume the remote dropped the key
-- even if it seemed to fail; the failure could have occurred
-- after it really dropped it
- Remote.remoteHasKey remote key False
+ Remote.logStatus remote key False
return ok
{- Checks specified remotes to verify that enough copies of a key exist to