Code review comment for lp:~lifeless/bzr/subunit

Revision history for this message
Robert Collins (lifeless) wrote :

On Wed, 2009-12-16 at 06:09 +0000, Martin Pool wrote:
> Review: Needs Fixing
> 8 +* New helper osutils.StreamWriter which encodes unicode objects but
> 9 + passes str objects straight through. This is used for selftest but
> 10 + may be useful for diff and other operations that generate mixed output.
> 11 + (Robert Collins)
> 12 +
>
> Please let's not have two things called StreamWriter that behave differently. needsfixing. Something like UnicodeOrBytesToBytesWriter.

Ok. I had called it StreamWriter because I plan to submit a patch to
python to fix this, as I believe it meets the /intent/ of the python
code more accurately, but I'm happy to rename it for now.

> + log = u"".join(self.getDetails()['log'].iter_text())
>
> Agree with Matt, this is ugly to repeat. Couldn't we have a convenience function for it?

Sure, I was intent on getting away from the tricky implementation we
had, but having done so can add back a get_log() happily. I'll do this
tomorrow.

-Rob

« Back to merge proposal