~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-06-20 02:58:19 UTC
  • mfrom: (4464.1.2 fix-shelf)
  • Revision ID: pqm@pqm.ubuntu.com-20090620025819-9fkf33yr3dvtwh2o
(abentley) Fix #363444 by fixing pack parsing with 0-length records.

Show diffs side-by-side

added added

removed removed

Lines of Context:
406
406
        # the buffer.
407
407
        last_buffer_length = None
408
408
        cur_buffer_length = len(self._buffer)
409
 
        while cur_buffer_length != last_buffer_length:
 
409
        last_state_handler = None
 
410
        while (cur_buffer_length != last_buffer_length
 
411
               or last_state_handler != self._state_handler):
410
412
            last_buffer_length = cur_buffer_length
 
413
            last_state_handler = self._state_handler
411
414
            self._state_handler()
412
415
            cur_buffer_length = len(self._buffer)
413
416