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'
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' self._access,
'incorrect number of lines %s != %s'
' for version {%s}'
% (len(record_ contents) , int(rec[2]), self._access,
'unexpected version end line %r, wanted %r'
--- 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(
+ ' (header = {%r}, last_line = {%r},'
+ ' record_contents = {%r}, rec = {%r})'
- version_id))
+ version_id,
+ header, last_line,
+ record_contents, rec),)
if last_line != 'end %s\n' % rec[1]:
raise KnitCorrupt(