aboutsummaryrefslogtreecommitdiff
path: root/Command/TestRemote.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-10-09 15:48:02 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-10-09 15:48:02 -0400
commit3c43af79d56a25bfff3eae1c1342c9a308223347 (patch)
treee52a095b8963ca42d6530d40bee5858ea8bfcf3c /Command/TestRemote.hs
parente36bfabb0e56087771d385a9f4ecdb342f1f14db (diff)
fix local dropping to not require extra locking of copies, but only that the local copy be locked for removal
Diffstat (limited to 'Command/TestRemote.hs')
-rw-r--r--Command/TestRemote.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Command/TestRemote.hs b/Command/TestRemote.hs
index 3a44a1bde..be1b9a324 100644
--- a/Command/TestRemote.hs
+++ b/Command/TestRemote.hs
@@ -120,7 +120,7 @@ test st r k =
, check "storeKey when already present" store
, present True
, check "retrieveKeyFile" $ do
- lockContentExclusive k removeAnnex
+ lockContentForRemoval k removeAnnex
get
, check "fsck downloaded object" fsck
, check "retrieveKeyFile resume from 33%" $ do
@@ -130,20 +130,20 @@ test st r k =
sz <- hFileSize h
L.hGet h $ fromInteger $ sz `div` 3
liftIO $ L.writeFile tmp partial
- lockContentExclusive k removeAnnex
+ lockContentForRemoval k removeAnnex
get
, check "fsck downloaded object" fsck
, check "retrieveKeyFile resume from 0" $ do
tmp <- prepTmp k
liftIO $ writeFile tmp ""
- lockContentExclusive k removeAnnex
+ lockContentForRemoval k removeAnnex
get
, check "fsck downloaded object" fsck
, check "retrieveKeyFile resume from end" $ do
loc <- Annex.calcRepo (gitAnnexLocation k)
tmp <- prepTmp k
void $ liftIO $ copyFileExternal CopyAllMetaData loc tmp
- lockContentExclusive k removeAnnex
+ lockContentForRemoval k removeAnnex
get
, check "fsck downloaded object" fsck
, check "removeKey when present" remove
@@ -189,7 +189,7 @@ testUnavailable st r k =
cleanup :: [Remote] -> [Key] -> Bool -> CommandCleanup
cleanup rs ks ok = do
forM_ rs $ \r -> forM_ ks (Remote.removeKey r)
- forM_ ks $ \k -> lockContentExclusive k removeAnnex
+ forM_ ks $ \k -> lockContentForRemoval k removeAnnex
return ok
chunkSizes :: Int -> Bool -> [Int]