changeset 9676:48bf28d3c8dd

bundlerepo: keep the bundlerevlog interface in sync with revlog
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sat, 31 Oct 2009 16:42:51 +0100
parents ee913987e4b0
children 0c072e63e3e7
files mercurial/bundlerepo.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundlerepo.py	Sat Oct 31 00:31:08 2009 +0100
+++ b/mercurial/bundlerepo.py	Sat Oct 31 16:42:51 2009 +0100
@@ -74,12 +74,12 @@
             return False
         return rev in self.basemap
     def bundlebase(self, rev): return self.basemap[rev]
-    def chunk(self, rev, df=None, cachelen=4096):
+    def _chunk(self, rev):
         # Warning: in case of bundle, the diff is against bundlebase,
         # not against rev - 1
         # XXX: could use some caching
         if not self.bundle(rev):
-            return revlog.revlog.chunk(self, rev, df)
+            return revlog.revlog._chunk(self, rev)
         self.bundlefile.seek(self.start(rev))
         return self.bundlefile.read(self.length(rev))
 
@@ -89,7 +89,7 @@
             # hot path for bundle
             revb = self.rev(self.bundlebase(rev2))
             if revb == rev1:
-                return self.chunk(rev2)
+                return self._chunk(rev2)
         elif not self.bundle(rev1) and not self.bundle(rev2):
             return revlog.revlog.revdiff(self, rev1, rev2)
 
@@ -116,7 +116,7 @@
             text = revlog.revlog.revision(self, iter_node)
 
         while chain:
-            delta = self.chunk(chain.pop())
+            delta = self._chunk(chain.pop())
             text = mdiff.patches(text, [delta])
 
         p1, p2 = self.parents(node)