aboutsummaryrefslogtreecommitdiff
path: root/Command/TestRemote.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-10-08 14:27:37 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-10-08 14:29:35 -0400
commitbab88f3596c570346a3d069af9e3c8ed92e473c9 (patch)
tree32384db58de249ef11c524446d1e0bf757c5fa10 /Command/TestRemote.hs
parent5434414bff35367aa62a4aaab0c4731a38dbe76e (diff)
add lockContentShared
Also, rename lockContent to lockContentExclusive inAnnexSafe should perhaps be eliminated, and instead use `lockContentShared inAnnex`. However, I'm waiting on that, as there are only 2 call sites for inAnnexSafe and it's fiddly.
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 7ee5f1359..3a44a1bde 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
- lockContent k removeAnnex
+ lockContentExclusive 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
- lockContent k removeAnnex
+ lockContentExclusive k removeAnnex
get
, check "fsck downloaded object" fsck
, check "retrieveKeyFile resume from 0" $ do
tmp <- prepTmp k
liftIO $ writeFile tmp ""
- lockContent k removeAnnex
+ lockContentExclusive 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
- lockContent k removeAnnex
+ lockContentExclusive 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 -> lockContent k removeAnnex
+ forM_ ks $ \k -> lockContentExclusive k removeAnnex
return ok
chunkSizes :: Int -> Bool -> [Int]