diff mercurial/changelog.py @ 3771:29d91e57d055

Handle transcoding of username and description in changelog
author Matt Mackall <mpm@selenic.com>
date Sun, 03 Dec 2006 16:16:33 -0600
parents f2de6b6bc57a
children abaee83ce0a6 f9bbcebcacea
line wrap: on
line diff
--- 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: