[merge] make "bzr testament" work with unicode commit messages
Robert Collins
robertc at robertcollins.net
Mon Feb 13 07:10:29 GMT 2006
On Sun, 2006-02-12 at 17:23 -0600, John A Meinel wrote:
> Marien Zwart wrote:
> > Currently "bzr testament" explodes with a UnicodeDecodeError if you
> > committed something with a non-ascii character in the commit message.
> > I have a branch from bzr.dev available at
> > http://mzz.mine.nu/bzr/bzr.dev which fixes this, adds a tests, and
> > cleans up an unnecessary function.
> >
> > I am pretty sure the effect of the fix is ok, since it makes the
> > function do what the docstring says it does. If the fix is not
> > thorough enough or should be done in a different way please let me
> > know.
> >
...
> You really need 2 spaces before the REV_UNICODE_COMMIT_TESTAMENT. but
> otherwise it looks good. We can clean up the whitespace when merging. +1
> from me.
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.
This matters because testaments get gpg signed and their sha1's must not
change - which means representation is significant.
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060213/5964321d/attachment.pgp
More information about the bazaar
mailing list