KnitCorrupt error

John Arbash Meinel john at arbash-meinel.com
Tue Aug 28 16:47:59 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Straw wrote:
> Thanks, I recovered using your suggestion.
> 
> There were no abnormal messages during the commit (or push) that would
> have indicated a potential problem, so I'm not sure what went wrong,
> although I suspect it happened during the commit. Adding the file to the
> recovered repository, committing, and pushing a 2nd time had no
> problems. Weird -- seemingly this issue is not reproducible. :(
> 
> Thanks again, anyhow.
> 
> -Andrew

Well, it sounds like data corruption. Though I couldn't tell you exactly what
happened.

Branching out, and recommitting will add the contents to a new entry. And
create a new revision id, so we no longer reference the old text in your
branch. (It should still be in the repository.)

I'm surprised at a few things, though.

1) If you actually had data corruption, I would have expected gzip to complain
about an invalid stream.

2) If the file contents didn't change between the two add+commit, then I would
expect the rest of the code to act the same.

The only thing I can think of which might be different is if the file has a
plain '\r' in it, rather than '\r\n' or '\n'.

It is *possible* that Mac's 'open('foo').readlines()' has a different effect
than GzipFile(compressed_txt).readlines()

On my Mac 10.4.10, with python 2.4.3, if I write a file with:
CRLF\r\n
LF\n
CR\r
CRLF\r\n

And then open with binary mode and do readlines() I get:
['CRLF\r\n', 'LF\n', 'CR\rCRLF\r\n']

Which is saying that it is only splitting on '\n', which is what I would hope
it would do.
It gives the same results if I open it without the 'b' flag on my Mac.

And also on my Mac, if I compress and decompress using the gzip.GzipFile
objects, it gives me the same results. I also verified that our
tuned_gzip.GzipFile gives the same results.

I also confirmed it on my Feisty machine with 0.15, so I don't think that is
the problem.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG1EOvJdeBCYSNAAMRAl+VAKDDp/7mgKvPI4G8aXrqGo/8BHV9NwCeOq/k
iwI8m4QwcQmshw498l3KHU8=
=JCQC
-----END PGP SIGNATURE-----



More information about the bazaar mailing list