~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-05 11:00:39 UTC
  • mfrom: (3982.1.1 bzr.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090205110039-w9oelsyvyx160qwy
(vila) Progress bar at socket level for http

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
 
124
124
        :param relpath: The relative path to the file
125
125
        """
 
126
        code, response_file = self._get(relpath, None)
126
127
        # FIXME: some callers want an iterable... One step forward, three steps
127
128
        # backwards :-/ And not only an iterable, but an iterable that can be
128
129
        # seeked backwards, so we will never be able to do that.  One such
129
130
        # known client is bzrlib.bundle.serializer.v4.get_bundle_reader. At the
130
131
        # time of this writing it's even the only known client -- vila20071203
131
 
        return StringIO(self.get_bytes(relpath))
132
 
 
133
 
    def get_bytes(self, relpath):
134
 
        """See Transport.get_bytes()."""
135
 
        code, response_file = self._get(relpath, None)
136
 
        return response_file.read()
 
132
        return StringIO(response_file.read())
137
133
 
138
134
    def _get(self, relpath, ranges, tail_amount=0):
139
135
        """Get a file, or part of a file.