##// END OF EJS Templates
revlog: deprecate the _nodecache attribute (API)...
marmoute -
r43930:6e3e3e54 default
parent child Browse files
Show More
@@ -388,7 +388,6 b' class revlog(object):'
388 # Mapping of partial identifiers to full nodes.
388 # Mapping of partial identifiers to full nodes.
389 self._pcache = {}
389 self._pcache = {}
390 # Mapping of revision integer to full node.
390 # Mapping of revision integer to full node.
391 self._nodecache = None
392 self._nodepos = None
391 self._nodepos = None
393 self._compengine = b'zlib'
392 self._compengine = b'zlib'
394 self._compengineopts = {}
393 self._compengineopts = {}
@@ -553,7 +552,7 b' class revlog(object):'
553 _(b"index %s is corrupted") % self.indexfile
552 _(b"index %s is corrupted") % self.indexfile
554 )
553 )
555 self.index, self._chunkcache = d
554 self.index, self._chunkcache = d
556 self.nodemap = self._nodecache = self.index.nodemap
555 self.nodemap = self.index.nodemap
557 if not self._chunkcache:
556 if not self._chunkcache:
558 self._chunkclear()
557 self._chunkclear()
559 # revnum -> (chain-length, sum-delta-length)
558 # revnum -> (chain-length, sum-delta-length)
@@ -632,6 +631,12 b' class revlog(object):'
632 self.rev(node0)
631 self.rev(node0)
633 return self.index.nodemap
632 return self.index.nodemap
634
633
634 @property
635 def _nodecache(self):
636 msg = "revlog._nodecache is deprecated, use revlog.index.nodemap"
637 util.nouideprecwarn(msg, b'5.3', stacklevel=2)
638 return self.index.nodemap
639
635 def hasnode(self, node):
640 def hasnode(self, node):
636 try:
641 try:
637 self.rev(node)
642 self.rev(node)
General Comments 0
You need to be logged in to leave comments. Login now