/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/lockable_files.py

Deprecate LockableFiles.put_utf8 and put_bytes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
        return codecs.getreader('utf-8')(self._transport.get(relpath))
172
172
 
173
173
    @needs_write_lock
 
174
    @deprecated_method(deprecated_in((1, 6, 0)))
174
175
    def put(self, path, file):
175
176
        """Write a file.
176
177
        
177
178
        :param path: The path to put the file, relative to the .bzr control
178
179
                     directory
179
 
        :param f: A file-like or string object whose contents should be copied.
 
180
        :param file: A file-like or string object whose contents should be copied.
 
181
 
 
182
        :deprecated: Use Transport methods instead.
180
183
        """
181
184
        self._transport.put_file(self._escape(path), file, mode=self._file_mode)
182
185
 
183
186
    @needs_write_lock
 
187
    @deprecated_method(deprecated_in((1, 6, 0)))
184
188
    def put_bytes(self, path, a_string):
185
189
        """Write a string of bytes.
186
190
 
187
191
        :param path: The path to put the bytes, relative to the transport root.
188
 
        :param string: A string object, whose exact bytes are to be copied.
 
192
        :param a_string: A string object, whose exact bytes are to be copied.
 
193
 
 
194
        :deprecated: Use Transport methods instead.
189
195
        """
190
196
        self._transport.put_bytes(self._escape(path), a_string,
191
197
                                  mode=self._file_mode)
197
203
 
198
204
        :param path: The path to put the string, relative to the transport root.
199
205
        :param string: A string or unicode object whose contents should be copied.
 
206
 
 
207
        :deprecated: Use Transport methods instead.
200
208
        """
201
209
        # IterableFile would not be needed if Transport.put took iterables
202
210
        # instead of files.  ADHB 2005-12-25