/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/versionedfile.py

  • Committer: John Arbash Meinel
  • Date: 2006-07-14 04:04:50 UTC
  • mto: This revision was merged to the branch mainline in revision 1885.
  • Revision ID: john@arbash-meinel.com-20060714040450-8a2022f094a2b73c
Allow Versioned files to do caching if explicitly asked, and implement for Knit

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    def __init__(self, access_mode):
54
54
        self.finished = False
55
55
        self._access_mode = access_mode
 
56
        self._cache_data = False
56
57
 
57
58
    def copy_to(self, name, transport):
58
59
        """Copy this versioned file to name on transport."""
59
60
        raise NotImplementedError(self.copy_to)
60
 
    
 
61
 
61
62
    @deprecated_method(zero_eight)
62
63
    def names(self):
63
64
        """Return a list of all the versions in this versioned file.
173
174
        if self._access_mode != 'w':
174
175
            raise errors.ReadOnlyObjectDirtiedError(self)
175
176
 
 
177
    def enable_cache(self):
 
178
        """Tell this versioned file that it should cache any data it reads.
 
179
        
 
180
        This is advisory, implementations do not have to support caching.
 
181
        """
 
182
        pass
 
183
    
176
184
    def clear_cache(self):
177
 
        """Remove any data cached in the versioned file object."""
 
185
        """Remove any data cached in the versioned file object.
 
186
 
 
187
        This only needs to be supported if caches are supported
 
188
        """
 
189
        pass
178
190
 
179
191
    def clone_text(self, new_version_id, old_version_id, parents):
180
192
        """Add an identical text to old_version_id as new_version_id.