~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockable_files.py

Deprecate LockableFiles.get

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
        return self._transport.abspath(self._escape(file_or_path))
151
151
 
152
152
    @needs_read_lock
 
153
    @deprecated_method(deprecated_in((1, 5, 0)))
153
154
    def get(self, relpath):
154
 
        """Get a file as a bytestream."""
 
155
        """Get a file as a bytestream.
 
156
        
 
157
        :deprecated: Use a Transport instead of LockableFiles.
 
158
        """
155
159
        relpath = self._escape(relpath)
156
160
        return self._transport.get(relpath)
157
161
 
158
162
    @needs_read_lock
159
163
    @deprecated_method(deprecated_in((1, 5, 0)))
160
164
    def get_utf8(self, relpath):
161
 
        """Get a file as a unicode stream."""
 
165
        """Get a file as a unicode stream.
 
166
        
 
167
        :deprecated: Use a Transport instead of LockableFiles.
 
168
        """
162
169
        relpath = self._escape(relpath)
163
170
        # DO NOT introduce an errors=replace here.
164
171
        return codecs.getreader('utf-8')(self._transport.get(relpath))