~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/hashcache.py

  • Committer: Robert Collins
  • Date: 2005-10-17 11:56:54 UTC
  • mfrom: (1185.16.59)
  • Revision ID: robertc@robertcollins.net-20051017115654-662239e1587524a8
mergeĀ fromĀ martin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
210
210
        finally:
211
211
            if not outf.closed:
212
212
                outf.abort()
 
213
        
 
214
 
213
215
 
214
216
    def read(self):
215
217
        """Reinstate cache from file.
224
226
        try:
225
227
            inf = file(fn, 'rb', buffering=65000)
226
228
        except IOError, e:
227
 
            mutter("failed to open %s: %s", fn, e)
 
229
            mutter("failed to open %s: %s" % (fn, e))
228
230
            # better write it now so it is valid
229
231
            self.needs_write = True
230
232
            return
232
234
 
233
235
        hdr = inf.readline()
234
236
        if hdr != CACHE_HEADER:
235
 
            mutter('cache header marker not found at top of %s;'
236
 
                   ' discarding cache', fn)
 
237
            mutter('cache header marker not found at top of %s; discarding cache'
 
238
                   % fn)
237
239
            self.needs_write = True
238
240
            return
239
241