~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/pack.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-02 07:00:21 UTC
  • mfrom: (4060.1.4 branch.roundtrips)
  • Revision ID: pqm@pqm.ubuntu.com-20090302070021-dvcjdpf47t2aeari
(robertc) Streaming fetch from non-stacked branches on smart servers.
        (Robert Collins, Andrew Bennetts_

Show diffs side-by-side

added added

removed removed

Lines of Context:
411
411
            self._state_handler()
412
412
            cur_buffer_length = len(self._buffer)
413
413
 
414
 
    def read_pending_records(self):
415
 
        records = self._parsed_records
416
 
        self._parsed_records = []
417
 
        return records
 
414
    def read_pending_records(self, max=None):
 
415
        if max:
 
416
            records = self._parsed_records[:max]
 
417
            del self._parsed_records[:max]
 
418
            return records
 
419
        else:
 
420
            records = self._parsed_records
 
421
            self._parsed_records = []
 
422
            return records
418
423
 
419
424
    def _consume_line(self):
420
425
        """Take a line out of the buffer, and return the line.