~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/statcache.py

  • Committer: Martin Pool
  • Date: 2005-05-10 06:13:49 UTC
  • Revision ID: mbp@sourcefrog.net-20050510061348-bb86d3b2f2f17ce2
- stat cache is written in utf-8 to accomodate non-ascii
  filenames

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
def write_cache(branch, entry_iter):
73
73
    from atomicfile import AtomicFile
74
74
    
75
 
    outf = AtomicFile(branch.controlfilename('work-cache.tmp'), 'wb')
 
75
    outf = AtomicFile(branch.controlfilename('work-cache'), 'w', 'utf-8')
76
76
    try:
77
77
        for entry in entry_iter:
78
78
            outf.write(entry[0] + ' ' + entry[1] + ' ')
89
89
    cache = {}
90
90
 
91
91
    try:
92
 
        cachefile = branch.controlfile('work-cache', 'rb')
 
92
        cachefile = branch.controlfile('work-cache', 'r')
93
93
    except IOError:
94
94
        return cache
95
95