mercurial/bundlerepo.py
changeset 29724 ac5f6b11aa91
parent 29723 0839c8d34d78
child 29725 9e88077f972c
--- a/mercurial/bundlerepo.py	Fri Aug 05 13:09:24 2016 -0400
+++ b/mercurial/bundlerepo.py	Fri Aug 05 13:09:50 2016 -0400
@@ -56,10 +56,8 @@
         self.repotiprev = n - 1
         chain = None
         self.bundlerevs = set() # used by 'bundle()' revset expression
-        while True:
-            chunkdata = bundle.deltachunk(chain)
-            if not chunkdata:
-                break
+        getchunk = lambda: bundle.deltachunk(chain)
+        for chunkdata in iter(getchunk, {}):
             node = chunkdata['node']
             p1 = chunkdata['p1']
             p2 = chunkdata['p2']