[Pkg-bazaar-commits] ./bzr/unstable r166: - Write .bzr.log in utf8

mbp at sourcefrog.net mbp at sourcefrog.net
Fri Apr 10 07:51:17 UTC 2009


------------------------------------------------------------
revno: 166
committer: mbp at sourcefrog.net
timestamp: Mon 2005-04-04 23:57:54 +1000
message:
  - Write .bzr.log in utf8
modified:
  NEWS
  bzrlib/trace.py
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2005-04-04 13:51:31 +0000
+++ b/NEWS	2005-04-04 13:57:54 +0000
@@ -15,8 +15,9 @@
 
   CHANGES:
 
-    * .bzr.log is placed in $HOME, not pwd.  (Probably not a
-      completely good long-term solution, but will do for now.)
+    * .bzr.log is placed in $HOME (not pwd) and is always written in
+      UTF-8.  (Probably not a completely good long-term solution, but
+      will do for now.)
 
   PORTABILITY:
 

=== modified file 'bzrlib/trace.py'
--- a/bzrlib/trace.py	2005-04-04 13:51:31 +0000
+++ b/bzrlib/trace.py	2005-04-04 13:57:54 +0000
@@ -20,7 +20,7 @@
 __author__ = "Martin Pool <mbp at canonical.com>"
 
 
-import sys, os, time, socket, stat
+import sys, os, time, socket, stat, codecs
 import bzrlib
 
 ######################################################################
@@ -87,7 +87,7 @@
 
     # XXX: Is HOME always set on Windows?
     trace_fname = os.path.join(os.environ['HOME'], '.bzr.log')
-    _tracefile = file(trace_fname, 'at')
+    _tracefile = codecs.open(trace_fname, 'at', 'utf8')
     t = _tracefile
 
     if os.fstat(t.fileno())[stat.ST_SIZE] == 0:



More information about the Pkg-bazaar-commits mailing list