Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlog.py @ 41457:e2e815e3c4ae
revlog: document cext oddities in terms of object/caches
This clarify why we just call clearcaches on a single object.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 25 Jan 2019 18:22:02 -0500 |
parents | ab0d762d89ef |
children | 13a6dd952ffe |
comparison
equal
deleted
inserted
replaced
41456:48394923fbdc | 41457:e2e815e3c4ae |
---|---|
605 self._chainbasecache.clear() | 605 self._chainbasecache.clear() |
606 self._chunkcache = (0, '') | 606 self._chunkcache = (0, '') |
607 self._pcache = {} | 607 self._pcache = {} |
608 | 608 |
609 try: | 609 try: |
610 # If we are using the native C version, you are in a fun case | |
611 # where self.index, self.nodemap and self._nodecaches is the same | |
612 # object. | |
610 self._nodecache.clearcaches() | 613 self._nodecache.clearcaches() |
611 except AttributeError: | 614 except AttributeError: |
612 self._nodecache = {nullid: nullrev} | 615 self._nodecache = {nullid: nullrev} |
613 self._nodepos = None | 616 self._nodepos = None |
614 | 617 |