Revert "temporary debugging code for windows autobuilder test suite failure"

This reverts commit 0d9fbd18c1.
This commit is contained in:
Joey Hess 2014-12-30 15:18:38 -04:00
parent 0d9fbd18c1
commit 33f1062bc3

View file

@ -130,13 +130,9 @@ goodContent key file = sameInodeCache file =<< recordedInodeCache key
- A key can be associated with multiple files, so may return more than - A key can be associated with multiple files, so may return more than
- one. -} - one. -}
recordedInodeCache :: Key -> Annex [InodeCache] recordedInodeCache :: Key -> Annex [InodeCache]
recordedInodeCache key = do recordedInodeCache key = withInodeCacheFile key $ \f ->
liftIO $ print ("recordedInodeCache", key, "start")
r <- withInodeCacheFile key $ \f ->
liftIO $ catchDefaultIO [] $ liftIO $ catchDefaultIO [] $
mapMaybe readInodeCache . lines <$> readFileStrict f mapMaybe readInodeCache . lines <$> readFileStrict f
liftIO $ print ("recordedInodeCache", key, "end")
return r
{- Caches an inode for a file. {- Caches an inode for a file.
- -
@ -155,24 +151,16 @@ addInodeCache key cache = do
{- Writes inode cache for a key. -} {- Writes inode cache for a key. -}
writeInodeCache :: Key -> [InodeCache] -> Annex () writeInodeCache :: Key -> [InodeCache] -> Annex ()
writeInodeCache key caches = do writeInodeCache key caches = withInodeCacheFile key $ \f ->
liftIO $ print ("writeInodeCache", key, "start")
r <- withInodeCacheFile key $ \f ->
modifyContent f $ modifyContent f $
liftIO $ writeFile f $ liftIO $ writeFile f $
unlines $ map showInodeCache caches unlines $ map showInodeCache caches
liftIO $ print ("writeInodeCache", key, "stop")
return r
{- Removes an inode cache. -} {- Removes an inode cache. -}
removeInodeCache :: Key -> Annex () removeInodeCache :: Key -> Annex ()
removeInodeCache key = do removeInodeCache key = withInodeCacheFile key $ \f ->
liftIO $ print ("removeInodeCache", key, "start")
r <- withInodeCacheFile key $ \f ->
modifyContent f $ modifyContent f $
liftIO $ nukeFile f liftIO $ nukeFile f
liftIO $ print ("removeInodeCache", key, "stop")
return r
withInodeCacheFile :: Key -> (FilePath -> Annex a) -> Annex a withInodeCacheFile :: Key -> (FilePath -> Annex a) -> Annex a
withInodeCacheFile key a = a =<< calcRepo (gitAnnexInodeCache key) withInodeCacheFile key a = a =<< calcRepo (gitAnnexInodeCache key)