diff mercurial/bundlerepo.py @ 12333:44c7dfc2f6a3

bundle: make getchunk() a method
author Matt Mackall <mpm@selenic.com>
date Sat, 18 Sep 2010 18:20:34 -0500
parents 680fe77ab5b8
children e21fe9c5fb25
line wrap: on
line diff
--- a/mercurial/bundlerepo.py	Fri Sep 17 19:24:29 2010 -0500
+++ b/mercurial/bundlerepo.py	Sat Sep 18 18:20:34 2010 -0500
@@ -33,7 +33,7 @@
         self.bundle = bundle
         self.basemap = {}
         def chunkpositer():
-            for chunk in changegroup.chunkiter(bundle):
+            for chunk in bundle.chunks():
                 pos = bundle.tell()
                 yield chunk, pos - len(chunk)
         n = len(self)
@@ -226,11 +226,11 @@
         if not self.bundlefilespos:
             self.bundle.seek(self.filestart)
             while 1:
-                chunk = changegroup.getchunk(self.bundle)
+                chunk = self.bundle.chunk()
                 if not chunk:
                     break
                 self.bundlefilespos[chunk] = self.bundle.tell()
-                for c in changegroup.chunkiter(self.bundle):
+                for c in self.bundle.chunks():
                     pass
 
         if f[0] == '/':