[MERGE] Faster code for pushing from packs back into knits
John Arbash Meinel
john at arbash-meinel.com
Mon Nov 26 19:25:24 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Aaron Bentley wrote:
...
>> Knit.get_texts is:
>> def get_texts(self, version_ids):
>> return [''.join(l) for l in self.get_line_list(version_ids)]
>
>> Also, we need to be careful with code like that. I believe I've seen cases
>> where StringIO(t).readlines() splits on '\r'. Which is why
>> osutils.split_lines() is written in such a sub-optimal way.
>
> I have tested over the course of implementing bundles. I would be
> surprised if it behaved as you suggest, because I was using
> str.splitlines, which did behave that way. This caused severe problems,
> which went away when I switched to StringIO.readlines().
You're right. I was remembering the str.splitlines() case.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHSx2kJdeBCYSNAAMRAisjAKC6YKQLHzaIHbuLMVmi0ITwwnpIbQCeOGuQ
m/kk8DRGPRHaJJ9pACETPbk=
=suaJ
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list