[PATCH] additional patch (forgot to send it with patchbomb)

Andrey grooz-work at gorodok.net
Sun Nov 12 13:13:41 CST 2006


# HG changeset patch
# User Andrey <grooz-work at gorodok.net>
# Date 1163358614 -21600
# Node ID 03ccc7ac233da5a029e78f978a5abb7c1ea7671c
# Parent  c936fe25df64ff4f4cee1cf9d372550f9a5d0477
encode/decode edited commit message

diff -r c936fe25df64 -r 03ccc7ac233d mercurial/ui.py
--- a/mercurial/ui.py   Sun Nov 12 23:51:13 2006 +0600
+++ b/mercurial/ui.py   Mon Nov 13 01:10:14 2006 +0600
@@ -435,7 +435,7 @@ class ui(object):
                                       text=True)
         try:
             f = os.fdopen(fd, "w")
-            f.write(text)
+            f.write(self.encode(text))
             f.close()

             editor = (os.environ.get("HGEDITOR") or
@@ -447,7 +447,7 @@ class ui(object):
                         onerr=util.Abort, errprefix=_("edit failed"))

             f = open(name)
-            t = f.read()
+            t = self.decode(f.read())
             f.close()
             t = re.sub("(?m)^HG:.*\n", "", t)
         finally:


More information about the Mercurial-devel mailing list