~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:07:16 UTC
  • Revision ID: mbp@sourcefrog.net-20050510060716-0f939ce3ddea5d15
- New command update-stat-cache for testing
- work-cache always stored with unix newlines and in ascii

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'), 'wt')
 
75
    outf = AtomicFile(branch.controlfilename('work-cache.tmp'), 'wb')
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', 'rt')
 
92
        cachefile = branch.controlfile('work-cache', 'rb')
93
93
    except IOError:
94
94
        return cache
95
95