~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http.py

  • Committer: John Arbash Meinel
  • Date: 2005-12-15 20:03:03 UTC
  • mto: (1185.50.20 bzr-jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1532.
  • Revision ID: john@arbash-meinel.com-20051215200303-be2d09abef0f6e57
Added mode to the appropriate transport functions, and tests to make sure they work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
196
196
                             % (self.abspath(relpath), str(e)),
197
197
                             orig_error=e)
198
198
 
199
 
    def put(self, relpath, f):
 
199
    def put(self, relpath, f, mode=None):
200
200
        """Copy the file-like or string object into the location.
201
201
 
202
202
        :param relpath: Location to put the contents, relative to base.
204
204
        """
205
205
        raise TransportNotPossible('http PUT not supported')
206
206
 
207
 
    def mkdir(self, relpath):
 
207
    def mkdir(self, relpath, mode=None):
208
208
        """Create a directory at the given path."""
209
209
        raise TransportNotPossible('http does not support mkdir()')
210
210
 
218
218
        """Copy the item at rel_from to the location at rel_to"""
219
219
        raise TransportNotPossible('http does not support copy()')
220
220
 
221
 
    def copy_to(self, relpaths, other, pb=None):
 
221
    def copy_to(self, relpaths, other, mode=None, pb=None):
222
222
        """Copy a set of entries from self into another Transport.
223
223
 
224
224
        :param relpaths: A list/generator of entries to be copied.
232
232
        if isinstance(other, HttpTransport):
233
233
            raise TransportNotPossible('http cannot be the target of copy_to()')
234
234
        else:
235
 
            return super(HttpTransport, self).copy_to(relpaths, other, pb=pb)
 
235
            return super(HttpTransport, self).copy_to(relpaths, other, mode=mode, pb=pb)
236
236
 
237
237
    def move(self, rel_from, rel_to):
238
238
        """Move the item at rel_from to the location at rel_to"""