changeset 30154:5e72129d75ed

revlog: add instance variable controlling delta chain use This is to support disabling delta chains on the changelog in a subsequent patch.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 24 Sep 2016 12:25:37 -0700
parents edb49a90723c
children b7a966ce89ed
files mercurial/revlog.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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