[darcs-users] zlib and patch crc errors: an update
ganesh at earth.li
Thu May 7 21:35:42 UTC 2009
I've been working on implementing some of the pieces we need to continue
the migration to the Haskell zlib  in the face of the repos out there
with corrupted CRCs .
So far I've updated zlib to report errors in a way that also returns the
data produced so far and allows the caller to decide whether to use it,
and updated the file reading code to make use of this interface and
produce a warning. You can look at the code for this work here . I
designed the zlib changes together with Duncan and have now submitted them
The next issue is how to actually repair the broken files. Once the
relevant files have been appropriately identified, the mechanics are
straightforward, but I'd like to be sure that all possible cases are
covered. Looking back through history, I think the corrupted files could
have been written out by all versions of darcs >=1.0.4 and <2.2.0.
One question I have is whether it's possible for corrupted files to exist
in places other than _darcs/patches. For example what about the global
patch cache, and the hashed pristine? The answers to this question will
determine how widely the repair command needs to operate.
My current plan is for the repair command to be a special option to darcs
repair, --patchcrcs, which will *only* repair bad CRCs and nothing else.
It will do so on all files it finds in _darcs/patches (and elsewhere if
appropriate), rather than just the ones mentioned in the current
inventory, because (a) that's actually easier and (b) I think it's a
More information about the darcs-users