~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/hashcache.py

  • Committer: Martin Pool
  • Date: 2005-09-12 09:45:18 UTC
  • Revision ID: mbp@sourcefrog.net-20050912094518-46a8e0d6b02dda98
- hashcache should be written out if it can't be read
  
  otherwise it never gets created if it doesn't exist

Show diffs side-by-side

added added

removed removed

Lines of Context:
224
224
            inf = file(fn, 'rb', buffering=65000)
225
225
        except IOError, e:
226
226
            mutter("failed to open %s: %s" % (fn, e))
 
227
            # better write it now so it is valid
 
228
            self.needs_write = True
227
229
            return
228
230
 
229
231
 
231
233
        if hdr != CACHE_HEADER:
232
234
            mutter('cache header marker not found at top of %s; discarding cache'
233
235
                   % fn)
 
236
            self.needs_write = True
234
237
            return
235
238
 
236
239
        for l in inf: