Patchwork [1,of,2] revlog: make 'storedeltachains' a "public" attribute

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 14, 2016, 1:08 a.m.
Message ID <e19eb107706e7210c3b3.1476407285@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/17072/
State Accepted
Headers show

Comments

Pierre-Yves David - Oct. 14, 2016, 1:08 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1476404708 -7200
#      Fri Oct 14 02:25:08 2016 +0200
# Node ID e19eb107706e7210c3b359d66f5274911b181566
# Parent  b7a966ce89ed9c68867b05d89ae7d3ab4b085468
# EXP-Topic storedeltachains
revlog: make 'storedeltachains' a "public" attribute

The next changeset will make that attribute read by the changegroup packer. We
make it "public" beforehand.

Patch

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -267,7 +267,7 @@  class changelog(revlog.revlog):
         # Delta chains for changelogs tend to be very small because entries
         # tend to be small and don't delta well with each. So disable delta
         # chains.
-        self._storedeltachains = False
+        self.storedeltachains = False
 
         self._realopener = opener
         self._delayed = False
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -297,7 +297,7 @@  class revlog(object):
             raise RevlogError(_("index %s unknown format %d")
                               % (self.indexfile, fmt))
 
-        self._storedeltachains = True
+        self.storedeltachains = True
 
         self._io = revlogio()
         if self.version == REVLOGV0:
@@ -1471,7 +1471,7 @@  class revlog(object):
             textlen = len(text)
 
         # should we try to build a delta?
-        if prev != nullrev and self._storedeltachains:
+        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