# HG changeset patch # User Eric Sumner <ericsumner@fb.com> # Date 2015-02-05 18:57:45 # Node ID 13d88b7eb3a092d434dc925c24c9cc9caa552d58 # Parent 731fa8e3e580573cbbdc6ae109b44414d2106fb1 bundle2: seek in part iterator When iterating over bundle2 parts, add a seek to the iterator so that processing will continue normally even if the entire part isn't consumed. diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -590,6 +590,7 @@ class unbundle20(unpackermixin): while headerblock is not None: part = unbundlepart(self.ui, headerblock, self._fp) yield part + part.seek(0, 2) headerblock = self._readpartheader() self.ui.debug('end of bundle2 stream\n')