# HG changeset patch
# User Gregory Szorc <gregory.sz...@gmail.com>
# Date 1474745137 25200
#      Sat Sep 24 12:25:37 2016 -0700
# Node ID aed87a8bed99b373eec5fb09dd2f76d166af59e8
# Parent  4c98fccd5b70d2f89fe48bdb81288448daed758c
revlog: add instance variable controlling delta chain use

This is to support disabling delta chains on the changelog in a
subsequent patch.

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -296,8 +296,10 @@ class revlog(object):
         elif fmt > REVLOGNG:
             raise RevlogError(_("index %s unknown format %d")
                               % (self.indexfile, fmt))
 
+        self._storedeltachains = True
+
         self._io = revlogio()
         if self.version == REVLOGV0:
             self._io = revlogoldio()
         try:
@@ -1468,9 +1470,9 @@ class revlog(object):
         else:
             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
             # isn't true is if this is the first revision in a delta chain
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to