diff mercurial/ui.py @ 2206:c74e91e81f70

Use text rather than binary mode for editing commit messages
author Stephen Darnell <stephen@darnell.plus.com>
date Thu, 04 May 2006 15:42:14 -0700
parents f15056b29472
children 7761597b5da3
line wrap: on
line diff
--- a/mercurial/ui.py	Thu May 04 15:25:24 2006 -0700
+++ b/mercurial/ui.py	Thu May 04 15:42:14 2006 -0700
@@ -242,7 +242,8 @@
     def debug(self, *msg):
         if self.debugflag: self.write(*msg)
     def edit(self, text, user):
-        (fd, name) = tempfile.mkstemp(prefix="hg-editor-", suffix=".txt")
+        (fd, name) = tempfile.mkstemp(prefix="hg-editor-", suffix=".txt",
+                                      text=True)
         try:
             f = os.fdopen(fd, "w")
             f.write(text)