[merge] make "bzr testament" work with unicode commit messages

Marien Zwart marienz at gentoo.org
Mon Feb 13 15:09:39 GMT 2006


On Mon, Feb 13, 2006 at 06:10:29PM +1100, Robert Collins wrote:
> The test is currently faulty - it checks for unicode equivalence, not
> for utf8 equivalence.
> 
> The check should be an assert for equality of two '.encode('utf8')'ed
> byte sequences, not of unicode strings.

That's what it is doing: there is a .encode('utf-8') hidden at the end
of the REV_UNICODE_COMMIT_TESTAMENT definition, and my patch makes
as_text_lines return utf8-encoded byte sequences, instead of the
unicode objects it returned previously. Unless how .encode('utf-8')
encodes things changes this should work.

If you think it's better I can replace the definition of
REV_UNICODE_COMMIT_TESTAMENT with a hardcoded byte string instead of
letting python utf8-encode a hardcoded unicode object.

-- 
Marien.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060213/84973a9f/attachment.pgp 


More information about the bazaar mailing list