Currently some of the tests are broken on case insensitive file systems.
* tests/issue1898-set-default-notification.sh
* issue612_repo_not_writeable.sh
Those tests interact poorly, because issue1898 doesn't clean up after itself (it leaves R1 around). issue612 test
_incorrectly_ pushes to r1 instead of temp1.
When I fixed both of the above, I discovered a new deeper problem. The test for issue612 stopped passing.
Digging into the source lead me to writeFileUsingCache, reproduced here:
-- | @writeFileUsingCache cache compression subdir contents@ write the string @contents@ to
-- the directory subdir, except if it is already in the cache, in which case it is a noop.
-- Warning (?) this means that in case of a hash collision, writing using writeFileUsingCache is
-- a noop. The returned value is the filename that was given to the string.
writeFileUsingCache :: Cache -> Compression -> HashedDir -> B.ByteString -> IO String
writeFileUsingCache (Ca cache) compr subdir ps =
(fetchFileUsingCachePrivate LocalOnly (Ca cache) subdir hash >> return hash) `catchall`
wfuc cache `catchall`
debugFail ("Couldn't write `"++hash++"'\nin subdir "++(hashedDir subdir)++" to sources:\n\n"++
show (Ca cache))
where hash = cacheHash ps
wfuc (c:cs) | not $ writable c = wfuc cs
| otherwise = do createCache c subdir
write compr (fn c) ps -- FIXME: create links in caches
return hash
wfuc [] = debugFail $ "No location to write file `" ++ (hashedDir subdir) ++"/"++hash ++ "'"
fn c = hashedFilePath c subdir hash
The problem might be with the first line. When I comment it out (meaning, it bypasses the cache and always tries to write
the file), the test goes back to working because darcs does fail to write the inventory.
Now, in the case where it fails to write this file, the repository seems to be consistent. So, I'm not sure what to make of
all of this.
|