[PATCH 2 of 2] revlog: introduce _chunkbase to allow filelog to override

Sune Foldager cryo at cyanite.org
Sat Apr 30 09:48:57 CDT 2011


# HG changeset patch
# User Sune Foldager <cryo at cyanite.org>
# Date 1304174027 -7200
# Node ID f71cdcb5314a76b1ef430f65d02d290f8c6157e4
# Parent  077073c1c7f57814756af83824e580dc788217a1
revlog: introduce _chunkbase to allow filelog to override

Used by revlog.revision to retrieve the base-chunk in a delta chain.

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -822,6 +822,9 @@
     def _chunk(self, rev):
         return decompress(self._chunkraw(rev, rev))
 
+    def _chunkbase(self, rev):
+        return self._chunk(rev)
+
     def _chunkclear(self):
         self._chunkcache = (0, '')
 
@@ -884,7 +887,7 @@
 
         self._chunkraw(base, rev)
         if text is None:
-            text = self._chunk(base)
+            text = self._chunkbase(base)
 
         bins = [self._chunk(r) for r in chain]
         text = mdiff.patches(text, bins)


More information about the Mercurial-devel mailing list