Package: bzr
Version: 0.8.2-3
Tags: upstream patch
Hello.
This is a copy of this launchpad bug:
https://launchpad.net/products/bzr/+bug/48307
Today I digged a bit and found that it's already fixed, and asked
upstream to include in 0.8.3. In the meantime, would you be willing to
apply the attached patch to the debian package? I'm also fine with
uploading myself if you'd like.
Thanks.
--
Adeodato Simó dato at net.com.org.es
Debian Developer adeodato at debian.org
Te has enfadado conmigo / porque te dejo / Es injusto
No quieres volver a verme / porque no quiero / que estemos juntos
Estás siendo egoísta / no has penseado que me quedo / solo yo también
-- Astrud, Caridad
--- bzrlib/msgeditor.py~
+++ bzrlib/msgeditor.py
@@ -17,12 +17,13 @@
"""Commit message editor support."""
-
+import codecs
import errno
import os
from subprocess import call
import sys
+import bzrlib
import bzrlib.config as config
from bzrlib.errors import BzrError
@@ -96,7 +97,8 @@
if infotext is not None and infotext != "":
hasinfo = True
msgfile = file(msgfilename, "w")
- msgfile.write("\n%s\n\n%s" % (ignoreline, infotext))
+ msgfile.write("\n\n%s\n\n%s" % (ignoreline,
+ infotext.encode(bzrlib.user_encoding, 'replace')))
msgfile.close()
else:
hasinfo = False
@@ -107,7 +109,7 @@
started = False
msg = []
lastline, nlines = 0, 0
- for line in file(msgfilename, "r"):
+ for line in codecs.open(msgfilename, 'r', bzrlib.user_encoding):
stripped_line = line.strip()
# strip empty line before the log message starts
if not started: