~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Martin Pool
  • Date: 2005-07-21 11:57:44 UTC
  • Revision ID: mbp@sourcefrog.net-20050721115744-e450602f7f11efa5
- fix up self reference in msvc lock object

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
# TODO: Don't allow WorkingTrees to be constructed for remote branches.
18
18
 
19
 
# FIXME: I don't know if writing out the cache from the destructor is really a
20
 
# good idea, because destructors are considered poor taste in Python, and
21
 
# it's not predictable when it will be written out.
22
 
 
23
19
import os
24
20
    
25
21
import bzrlib.tree
47
43
        # in the future we might want to do this more selectively
48
44
        hc = self._hashcache = HashCache(basedir)
49
45
        hc.read()
50
 
        hc.scan()
 
46
        for path, ie in inv.iter_entries():
 
47
            hc.get_sha1(path)
51
48
 
52
49
        if hc.needs_write:
53
50
            mutter("write hc")
54
51
            hc.write()
55
 
            
56
 
            
57
 
    def __del__(self):
58
 
        if self._hashcache.needs_write:
59
 
            self._hashcache.write()
 
52
 
60
53
 
61
54
 
62
55
    def __iter__(self):
73
66
 
74
67
    def __repr__(self):
75
68
        return "<%s of %s>" % (self.__class__.__name__,
76
 
                               getattr(self, 'basedir', None))
 
69
                               self.basedir)
77
70
 
78
71
 
79
72
 
290
283
                    return pat
291
284
        else:
292
285
            return None
293
 
        
 
 
b'\\ No newline at end of file'
 
286
        
 
287
 
 
288
        
 
289
        
 
290