~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 23:06:25 UTC
  • Revision ID: mbp@sourcefrog.net-20050722230625-c634e162df1060c7
- show progress on dumb terminals by printing dots

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
 
19
23
import os
20
24
    
21
25
import bzrlib.tree
43
47
        # in the future we might want to do this more selectively
44
48
        hc = self._hashcache = HashCache(basedir)
45
49
        hc.read()
46
 
        for path, ie in inv.iter_entries():
47
 
            hc.get_sha1(path)
 
50
        hc.scan()
48
51
 
49
52
        if hc.needs_write:
50
53
            mutter("write hc")
51
54
            hc.write()
52
 
 
 
55
            
 
56
            
 
57
    def __del__(self):
 
58
        if self._hashcache.needs_write:
 
59
            self._hashcache.write()
53
60
 
54
61
 
55
62
    def __iter__(self):
66
73
 
67
74
    def __repr__(self):
68
75
        return "<%s of %s>" % (self.__class__.__name__,
69
 
                               self.basedir)
 
76
                               getattr(self, 'basedir', None))
70
77
 
71
78
 
72
79
 
283
290
                    return pat
284
291
        else:
285
292
            return None
286
 
        
287
 
 
288
 
        
289
 
        
290
 
 
 
293
        
 
 
b'\\ No newline at end of file'