Mercurial > public > mercurial-scm > hg
comparison mercurial/revlog.py @ 43528:90a0f631829e
revlog: return the nodemap as the nodecache
Ultimately, the nodecache is the nodemap. To stop having this disctinction, we
start using the nodemap where the nodecache was used.
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7316
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 02 Nov 2019 15:21:28 +0100 |
parents | e258ad110488 |
children | bf176127033a |
comparison
equal
deleted
inserted
replaced
43527:43424f03d9a4 | 43528:90a0f631829e |
---|---|
628 def nodemap(self): | 628 def nodemap(self): |
629 if self.index: | 629 if self.index: |
630 # populate mapping down to the initial node | 630 # populate mapping down to the initial node |
631 node0 = self.index[0][7] # get around changelog filtering | 631 node0 = self.index[0][7] # get around changelog filtering |
632 self.rev(node0) | 632 self.rev(node0) |
633 return self._nodecache | 633 return self.index.nodemap |
634 | 634 |
635 def hasnode(self, node): | 635 def hasnode(self, node): |
636 try: | 636 try: |
637 self.rev(node) | 637 self.rev(node) |
638 return True | 638 return True |