[MERGE] Use a list not a tuple for chunks returned from FullTextContentFactory objects, because otherwise code tries to assign to tuples.
John Arbash Meinel
john at arbash-meinel.com
Tue Feb 3 20:25:43 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> On Tue, 2009-02-03 at 10:03 -0600, John Arbash Meinel wrote:
>
>> You know what... the problem could be if 'fulltext' is empty, or a
>> single line long. In that case the 'chunks_to_lines()' code will loop,
>> and see that all of the entries are valid lines, and just return the
>> original object, rather than returning a list.
>>
>> So probably a better fix is to change the chunks_to_lines code to always
>> create a new list, rather than returning the original object. There
>> would be some overhead in creating a new list, and then getting rid of
>> the original, but it shouldn't be a lot.
>
> I was assuming that we didn't want to add overhead :P. In particular for
> large texts, just making a new list can be quite time consuming in
> aggregate, as learnt in previous commit optimisation efforts.
>
> -Rob
I think we could easily add a check that the object is a list, but I
guess I don't really care. Your fix is fine.
BB:approve
(Though bb won't like me approving this late in the thread.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmIqEcACgkQJdeBCYSNAAPMXwCeMkkT/K9o6jgd1x2wqgB2rErM
xEYAoJ+MW6DMFyfnl+f4Lv1skYYlWmU5
=FCw5
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list