Handle transcoding of username and description in changelog
authorMatt Mackall <mpm@selenic.com>
Sun, 03 Dec 2006 16:16:33 -0600
changeset 3771 29d91e57d055
parent 3770 f96c158ea3a3
child 3772 73860ffbe798
Handle transcoding of username and description in changelog
mercurial/changelog.py
--- a/mercurial/changelog.py	Sun Dec 03 16:16:33 2006 -0600
+++ b/mercurial/changelog.py	Sun Dec 03 16:16:33 2006 -0600
@@ -61,10 +61,10 @@
         if not text:
             return (nullid, "", (0, 0), [], "", {})
         last = text.index("\n\n")
-        desc = text[last + 2:]
+        desc = util.tolocal(text[last + 2:])
         l = text[:last].split('\n')
         manifest = bin(l[0])
-        user = l[1]
+        user = util.tolocal(l[1])
 
         extra_data = l[2].split(' ', 2)
         if len(extra_data) != 3:
@@ -88,6 +88,8 @@
     def add(self, manifest, list, desc, transaction, p1=None, p2=None,
                   user=None, date=None, extra={}):
 
+        user, desc = util.fromlocal(user), util.fromlocal(desc)
+
         if date:
             parseddate = "%d %d" % util.parsedate(date)
         else: