/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/transport/__init__.py

  • Committer: Robert Collins
  • Date: 2007-10-08 04:53:50 UTC
  • mfrom: (2890.1.2 readv)
  • mto: This revision was merged to the branch mainline in revision 2933.
  • Revision ID: robertc@robertcollins.net-20071008045350-qwh1gb3r9vy3c8kk
Readv fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
695
695
            current_offset, current_length = new_offsets[0]
696
696
            current_finish = current_length + current_offset
697
697
            for offset, length in new_offsets[1:]:
 
698
                finish = offset + length
698
699
                if offset > current_finish:
 
700
                    # there is a gap, output the current accumulator and start
 
701
                    # a new one for the region we're examining.
699
702
                    offsets.append((current_offset, current_length))
700
703
                    current_offset = offset
701
704
                    current_length = length
 
705
                    current_finish = finish
702
706
                    continue
703
 
                finish = offset + length
704
707
                if finish > current_finish:
 
708
                    # extend the current accumulator to the end of the region
 
709
                    # we're examining.
705
710
                    current_finish = finish
 
711
                    current_length = finish - current_offset
706
712
            offsets.append((current_offset, current_length))
707
713
        return self._readv(relpath, offsets)
708
714