diff options
author | Joey Hess <joeyh@joeyh.name> | 2014-12-30 15:18:38 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2014-12-30 15:18:38 -0400 |
commit | f8d28a9a88d97529228c179cd44e6fee4333e1d8 (patch) | |
tree | 5f2648ee261acc23fbf3c3c009253ec279f09362 /Annex | |
parent | 59956b117da3070cc0d66e997ff3b318fb6153d4 (diff) |
Revert "temporary debugging code for windows autobuilder test suite failure"
This reverts commit 59956b117da3070cc0d66e997ff3b318fb6153d4.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Content/Direct.hs | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs index ca1a50530..d9e1535f3 100644 --- a/Annex/Content/Direct.hs +++ b/Annex/Content/Direct.hs @@ -130,13 +130,9 @@ goodContent key file = sameInodeCache file =<< recordedInodeCache key - A key can be associated with multiple files, so may return more than - one. -} recordedInodeCache :: Key -> Annex [InodeCache] -recordedInodeCache key = do - liftIO $ print ("recordedInodeCache", key, "start") - r <- withInodeCacheFile key $ \f -> - liftIO $ catchDefaultIO [] $ - mapMaybe readInodeCache . lines <$> readFileStrict f - liftIO $ print ("recordedInodeCache", key, "end") - return r +recordedInodeCache key = withInodeCacheFile key $ \f -> + liftIO $ catchDefaultIO [] $ + mapMaybe readInodeCache . lines <$> readFileStrict f {- Caches an inode for a file. - @@ -155,24 +151,16 @@ addInodeCache key cache = do {- Writes inode cache for a key. -} writeInodeCache :: Key -> [InodeCache] -> Annex () -writeInodeCache key caches = do - liftIO $ print ("writeInodeCache", key, "start") - r <- withInodeCacheFile key $ \f -> - modifyContent f $ - liftIO $ writeFile f $ - unlines $ map showInodeCache caches - liftIO $ print ("writeInodeCache", key, "stop") - return r +writeInodeCache key caches = withInodeCacheFile key $ \f -> + modifyContent f $ + liftIO $ writeFile f $ + unlines $ map showInodeCache caches {- Removes an inode cache. -} removeInodeCache :: Key -> Annex () -removeInodeCache key = do - liftIO $ print ("removeInodeCache", key, "start") - r <- withInodeCacheFile key $ \f -> - modifyContent f $ - liftIO $ nukeFile f - liftIO $ print ("removeInodeCache", key, "stop") - return r +removeInodeCache key = withInodeCacheFile key $ \f -> + modifyContent f $ + liftIO $ nukeFile f withInodeCacheFile :: Key -> (FilePath -> Annex a) -> Annex a withInodeCacheFile key a = a =<< calcRepo (gitAnnexInodeCache key) |