~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Martin Pool
  • Date: 2005-07-22 18:49:46 UTC
  • Revision ID: mbp@sourcefrog.net-20050722184946-4bd334f8c0d75957
- separate out code that just scans the hash cache to find files that are possibly
  changed; don't actually re-read them unless the content has changed

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        # in the future we might want to do this more selectively
44
44
        hc = self._hashcache = HashCache(basedir)
45
45
        hc.read()
46
 
        for path, ie in inv.iter_entries():
47
 
            hc.get_sha1(path)
 
46
        hc.scan()
48
47
 
49
48
        if hc.needs_write:
50
49
            mutter("write hc")
51
50
            hc.write()
52
 
 
 
51
            
 
52
            
 
53
    def __del__(self):
 
54
        if self._hashcache.needs_write:
 
55
            self._hashcache.write()
53
56
 
54
57
 
55
58
    def __iter__(self):
66
69
 
67
70
    def __repr__(self):
68
71
        return "<%s of %s>" % (self.__class__.__name__,
69
 
                               self.basedir)
 
72
                               getattr(self, 'basedir', None))
70
73
 
71
74
 
72
75