# HG changeset patch # User Stephen Darnell # Date 1146782534 25200 # Node ID c74e91e81f70b5f420e88bc9e7fd7a807f93568d # Parent 62df298736be71e11b6d56b93d8166c32be1d9cd Use text rather than binary mode for editing commit messages diff -r 62df298736be -r c74e91e81f70 mercurial/ui.py --- 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)