version-info --include-history UnicodeDecodeError (518609)

Martin (gzlist) gzlist at googlemail.com
Sat Apr 3 00:21:24 BST 2010


On 02/04/2010, Parth Malwankar <parth.malwankar at gmail.com> wrote:
>
> I noticed that message is unicode and based on irc chat with lifeless
> I understand that message should not be unicode. Sure enough, the
> patch below fixes the issue.

I'd say you have it backwards. The console streamwriter expects to be
given unicode that it can then coerce to the right terminal encoding,
but Stanza.to_lines has gone and screwed up the plan by making
everything UTF-8 already. Changing RioWriter.write_stanza or
Stanza.write looks like the correct fix to me.

> +                log.add('message', message.encode('ascii', 'ignore'))

Ugh, I have enough of idiocy like "D?o Gottwald" from mercurial when
looking at mozilla-central. Asking for ascii-with-question-marks is
never going to be the right thing.

> I have a questions regarding this.
> - Does bzr store messages as ascii?

No? How could you write non-English commit messages if that were the case?

Martin



More information about the bazaar mailing list