# HG changeset patch # User Shun-ichi GOTO # Date 1199309130 -32400 # Node ID 4c16020d11720b4f9ca07e5cac7be94ab9b70f82 # Parent 68f5bf9aa5827e11ec35a625def7eea4806815b9 convert: print commit log message with local encoding correctly. diff -r 68f5bf9aa582 -r 4c16020d1172 hgext/convert/convcmd.py --- a/hgext/convert/convcmd.py Thu Jan 03 06:25:30 2008 +0900 +++ b/hgext/convert/convcmd.py Thu Jan 03 06:25:30 2008 +0900 @@ -248,6 +248,10 @@ desc = self.commitcache[c].desc if "\n" in desc: desc = desc.splitlines()[0] + # convert log message to local encoding without using + # tolocal() because util._encoding conver() use it as + # 'utf-8' + desc = desc.decode('utf-8').encode(orig_encoding, 'replace') self.ui.status("%d %s\n" % (num, desc)) self.copy(c) @@ -276,7 +280,11 @@ self.source.after() self.map.close() +orig_encoding = 'ascii' + def convert(ui, src, dest=None, revmapfile=None, **opts): + global orig_encoding + orig_encoding = util._encoding util._encoding = 'UTF-8' if not dest: