revlog: add instance variable controlling delta chain use
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 24 Sep 2016 12:25:37 -0700
changeset 30154 5e72129d75ed
parent 30153 edb49a90723c
child 30155 b7a966ce89ed
revlog: add instance variable controlling delta chain use This is to support disabling delta chains on the changelog in a subsequent patch.
mercurial/revlog.py
--- a/mercurial/revlog.py	Thu Oct 13 12:49:47 2016 +0200
+++ b/mercurial/revlog.py	Sat Sep 24 12:25:37 2016 -0700
@@ -297,6 +297,8 @@
             raise RevlogError(_("index %s unknown format %d")
                               % (self.indexfile, fmt))
 
+        self._storedeltachains = True
+
         self._io = revlogio()
         if self.version == REVLOGV0:
             self._io = revlogoldio()
@@ -1469,7 +1471,7 @@
             textlen = len(text)
 
         # should we try to build a delta?
-        if prev != nullrev:
+        if prev != nullrev and self._storedeltachains:
             tested = set()
             # This condition is true most of the time when processing
             # changegroup data into a generaldelta repo. The only time it