mercurial/bundlerepo.py
changeset 29723 0839c8d34d78
parent 29703 39537bc64442
child 29724 ac5f6b11aa91
--- a/mercurial/bundlerepo.py	Fri Aug 05 12:47:03 2016 -0400
+++ b/mercurial/bundlerepo.py	Fri Aug 05 13:09:24 2016 -0400
@@ -351,10 +351,7 @@
     def file(self, f):
         if not self.bundlefilespos:
             self.bundle.seek(self.filestart)
-            while True:
-                chunkdata = self.bundle.filelogheader()
-                if not chunkdata:
-                    break
+            for chunkdata in iter(self.bundle.filelogheader, {}):
                 fname = chunkdata['filename']
                 self.bundlefilespos[fname] = self.bundle.tell()
                 while True: