diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-10-09 15:48:02 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-10-09 15:48:02 -0400 |
commit | 3c43af79d56a25bfff3eae1c1342c9a308223347 (patch) | |
tree | e52a095b8963ca42d6530d40bee5858ea8bfcf3c /Command/TestRemote.hs | |
parent | e36bfabb0e56087771d385a9f4ecdb342f1f14db (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.hs | 10 |
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] |