[Pkg-bazaar-commits] ./bzr/unstable r259: - use larger file buffers when opening branch control file
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 07:43:55 UTC 2009
------------------------------------------------------------
revno: 259
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Fri 2005-04-15 12:38:27 +1000
message:
- use larger file buffers when opening branch control file
modified:
bzrlib/branch.py
-------------- next part --------------
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py 2005-04-15 01:31:21 +0000
+++ b/bzrlib/branch.py 2005-04-15 02:38:27 +0000
@@ -165,9 +165,11 @@
if mode == 'rb' or mode == 'wb':
return file(fn, mode)
elif mode == 'r' or mode == 'w':
- # open in binary mode anyhow so there's no newline translation
+ # open in binary mode anyhow so there's no newline translation;
+ # codecs uses line buffering by default; don't want that.
import codecs
- return codecs.open(fn, mode + 'b', 'utf-8')
+ return codecs.open(fn, mode + 'b', 'utf-8',
+ buffering=60000)
else:
raise BzrError("invalid controlfile mode %r" % mode)
More information about the Pkg-bazaar-commits
mailing list