Comment 5 for bug 219832

Revision history for this message
John Steele Scott (toojays) wrote :

Andrew,

I'm not a bzr developer, but it might be helpful for them if you could post the output you get from the assert with the below patch applied. I can't do it because I'm working with a proprietary repo. It looked to me like the corrupt "knit" wasn't really a knit at all. AFAIK a knit resembles a diff, and what was coming out here looked a lot more like an inventory.

=== modified file 'bzrlib/knit.py'
--- bzrlib/knit.py 2008-04-09 23:35:55 +0000
+++ bzrlib/knit.py 2008-04-24 23:48:42 +0000
@@ -2464,8 +2464,12 @@
             raise KnitCorrupt(self._access,
                               'incorrect number of lines %s != %s'
                               ' for version {%s}'
+ ' (header = {%r}, last_line = {%r},'
+ ' record_contents = {%r}, rec = {%r})'
                               % (len(record_contents), int(rec[2]),
- version_id))
+ version_id,
+ header, last_line,
+ record_contents, rec),)
         if last_line != 'end %s\n' % rec[1]:
             raise KnitCorrupt(self._access,
                               'unexpected version end line %r, wanted %r'