fastimport: handling UTF-8

Greg Ward greg-hg at gerg.ca
Fri May 8 10:25:28 CDT 2009


On Fri, May 8, 2009 at 11:11 AM, Matt Mackall <mpm at selenic.com> wrote:
> You missed the specific piece I pointed you to: how convert changes
> hg's current notion of what the local encoding is to UTF-8. By either
> changing encoding.encoding (tip) or util._encoding (released)

So monkeypatching encoding.encoding is OK when converting from a
source whose encoding is known?  Good, because that's what I ended up
doing in hg-fastimport.

And I take back what I said about converting from (e.g.) Subversion
with non-ASCII chars.  The conversion works fine; it's just the
post-convert hg output in the tests that is mangled because of LANG
and LC_ALL.  If I hack the test slightly more to run "export
HGENCODING=utf-8", then it fails just as I expected it to. *phew!*

However: I still think it would be useful to test that converting
from, say, svn and git with non-ASCII metadata would be a good thing
to do.  Interested in a patch to the tests for that?

Greg


More information about the Mercurial-devel mailing list