[PATCH 4 of 8] encode all output in stdio encoding

Alexis S. L. Carvalho alexis at cecm.usp.br
Mon Nov 20 18:34:20 UTC 2006


Thus spake Alexis S. L. Carvalho:
> Thus spake Andrey:
> > I should better have written something like 'encode all output in stdio 
> > encoding, if not already encoded' in commit message. :) That ui.ui.encode() 
> > function leaves all non-Unicode strings untouched, so hg cat works as 
> > expected.
> > 
> 
> It prints a traceback with hg log --patch with a revision that changes
> the encoding of a file.

Hmm...  ok, it doesn't even get to ui.write - the current log code puts
all strings in a list and does a ui.write("".join(strings)).  This
patchset changes some of these strings from str's to unicode's, and so
the "".join() raises an exception when it fails to convert the patch to
a unicode.

Alexis



More information about the Mercurial-devel mailing list