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

Sune Foldager cryo at cyanite.org
Mon Jan 31 04:21:40 CST 2011


# HG changeset patch
# User Sune Foldager <cryo at cyanite.org>
# Date 1296294467 -3600
# Node ID 228f2570b1922c797b969dab28a28e3f1ec99cf7
# Parent  90afd2364f5d05afe149156379fc3ee6dfd604fe
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
@@ -802,6 +802,8 @@
     def _chunk(self, rev):
         return decompress(self._chunkraw(rev, rev))
 
+    _chunkbase = _chunk
+
     def _chunkclear(self):
         self._chunkcache = (0, '')
 
@@ -864,7 +866,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