~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store/weave.py

  • Committer: Robert Collins
  • Date: 2005-10-03 05:54:35 UTC
  • mto: (1393.1.30)
  • mto: This revision was merged to the branch mainline in revision 1400.
  • Revision ID: robertc@robertcollins.net-20051003055434-c8ebd30d1de10247
move exporting functionality into inventory.py - uncovers bug in symlink support

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
from bzrlib.trace import mutter
33
33
 
34
34
 
 
35
 
 
36
 
35
37
class WeaveStore(Store):
36
38
    """Collection of several weave files in a directory.
37
39
 
42
44
    def __init__(self, transport):
43
45
        self._transport = transport
44
46
        self._cache = {}
45
 
        self.enable_cache = False
 
47
        self.enable_cache = False
46
48
 
47
49
 
48
50
    def filename(self, file_id):
66
68
    def _put(self, file_id, f):
67
69
        return self._transport.put(self.filename(file_id), f)
68
70
 
 
71
 
69
72
    def get_weave(self, file_id):
70
73
        if self.enable_cache:
71
74
            if file_id in self._cache:
72
 
                mutter("cache hit in %s for %s", self, file_id)
73
75
                return self._cache[file_id]
74
76
        w = read_weave(self._get(file_id))
75
77
        if self.enable_cache: