revlog: add instance variable controlling delta chain use
This is to support disabling delta chains on the changelog in a
subsequent patch.
--- 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