[patch] [hgext/convert] decode commit log for ui.status()

Shun-ichi GOTO shunichi.goto at gmail.com
Wed Aug 15 02:08:40 CDT 2007


Hi,
On converting svn repo with 'convert' extension,
I've got broken non-ascii (Japanese) log message on progress message.

Here is a small patch:
{{{
diff -r 6159f529a1ea hgext/convert/__init__.py
--- a/hgext/convert/__init__.py Wed Aug 15 14:13:50 2007 +0900
+++ b/hgext/convert/__init__.py Wed Aug 15 15:10:01 2007 +0900
@@ -232,7 +232,7 @@ class convert(object):
             self.ui.status("converting...\n")
             for c in t:
                 num -= 1
-                desc = self.commitcache[c].desc
+                desc = self.commitcache[c].desc.decode('utf-8')
                 if "\n" in desc:
                     desc = desc.splitlines()[0]
                 author = self.commitcache[c].author
}}}

-- 
Shun-ichi GOTO


More information about the Mercurial mailing list