[merge][1.6][#234748] fix KnitCorrupt error in check on bzr.dev
mbp at canonical.com
Wed May 28 07:57:54 BST 2008
Happily to say the repository is not corrupt (and this is an
increasingly poorly-named error) but there is a bug in the knit code
for extracting several values at a time.
The basic problem is of memory aliasing; we have a dict pointing to
the contents of other file text and accidentally mutate a list within
it. The previous code tried to protect against this but failed. The
main point is that calling .text() on a KnitContent object will
already take trailing eols into account so no special handling is
I'd kind of like to remove more of the special-casing here of
extraction of multiple files, but I guess it is there as an
optimization so shouldn't be done without measurement.
Thanks very much to spiv for tracking this down with me.
This still needs a test and news entry but I thought I'd put up the
core fix now.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2618 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080528/5c94ce49/attachment.bin
More information about the bazaar