hgext/convert/convcmd.py
changeset 5794 4c16020d1172
parent 5656 b940260c4291
child 5954 851402e53337
--- 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: