Patchwork [2,of,2] revlog: remove the, now unused, `revlog._nodepos` attribute

login
register
mail settings
Submitter Pierre-Yves David
Date Nov. 10, 2019, 5:26 p.m.
Message ID <3378f9eec9c34448d07f.1573406818@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/43105/
State Accepted
Headers show

Comments

Pierre-Yves David - Nov. 10, 2019, 5:26 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1573406154 -3600
#      Sun Nov 10 18:15:54 2019 +0100
# Node ID 3378f9eec9c34448d07fcebee5d8b5c728c8e855
# Parent  26c342b1b1e492b5b3c08c0dcc71492784dc766c
# EXP-Topic nodemap-preparation
# Available At https://dev.heptapod.net/octobus/mercurial-devel/
#              hg pull https://dev.heptapod.net/octobus/mercurial-devel/ -r 3378f9eec9c3
revlog: remove the, now unused, `revlog._nodepos` attribute

Spotted by Yuya Nishihara.

Patch

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -421,7 +421,6 @@  class revlog(object):
         # Mapping of partial identifiers to full nodes.
         self._pcache = {}
         # Mapping of revision integer to full node.
-        self._nodepos = None
         self._compengine = b'zlib'
         self._compengineopts = {}
         self._maxdeltachainspan = -1
@@ -2223,11 +2222,6 @@  class revlog(object):
         )
         self.index.append(e)
 
-        # Reset the pure node cache start lookup offset to account for new
-        # revision.
-        if self._nodepos is not None:
-            self._nodepos = curr
-
         entry = self._io.packentry(e, self.node, self.version, curr)
         self._writeentry(
             transaction, ifh, dfh, entry, deltainfo.data, link, offset
@@ -2462,7 +2456,6 @@  class revlog(object):
         self._chunkclear()
 
         del self.index[rev:-1]
-        self._nodepos = None
 
     def checksize(self):
         """Check size of index and data files