[PATCH 2 of 3] bundle2: seek in part iterator
Eric Sumner
ericsumner at fb.com
Thu Feb 5 19:10:30 UTC 2015
# HG changeset patch
# User Eric Sumner <ericsumner at fb.com>
# Date 1423162665 28800
# Thu Feb 05 10:57:45 2015 -0800
# Node ID cacd3119be7dd5681f6bf05a167115d0cba01236
# Parent 8eeb3f4489fbe9c66d2ac0a8fd90abc973619bbc
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 @@
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')
More information about the Mercurial-devel
mailing list