# HG changeset patch # User Gregory Szorc # Date 1474745137 25200 # Node ID 5e72129d75edc2535f17d3b2a960d993bafc01a9 # Parent edb49a90723cf54272c8dd57bbd76a092e16abe8 revlog: add instance variable controlling delta chain use This is to support disabling delta chains on the changelog in a subsequent patch. diff -r edb49a90723c -r 5e72129d75ed 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