Show More
@@ -406,6 +406,11 b' class _InnerRevlog:' | |||||
406 | def __len__(self): |
|
406 | def __len__(self): | |
407 | return len(self.index) |
|
407 | return len(self.index) | |
408 |
|
408 | |||
|
409 | def clear_cache(self): | |||
|
410 | self._revisioncache = None | |||
|
411 | self._segmentfile.clear_cache() | |||
|
412 | self._segmentfile_sidedata.clear_cache() | |||
|
413 | ||||
409 | # Derived from index values. |
|
414 | # Derived from index values. | |
410 |
|
415 | |||
411 | def start(self, rev): |
|
416 | def start(self, rev): | |
@@ -1807,10 +1812,8 b' class revlog:' | |||||
1807 |
|
1812 | |||
1808 | def clearcaches(self): |
|
1813 | def clearcaches(self): | |
1809 | """Clear in-memory caches""" |
|
1814 | """Clear in-memory caches""" | |
1810 | self._inner._revisioncache = None |
|
|||
1811 | self._chainbasecache.clear() |
|
1815 | self._chainbasecache.clear() | |
1812 |
self._inner. |
|
1816 | self._inner.clear_cache() | |
1813 | self._inner._segmentfile_sidedata.clear_cache() |
|
|||
1814 | self._pcache = {} |
|
1817 | self._pcache = {} | |
1815 | self._nodemap_docket = None |
|
1818 | self._nodemap_docket = None | |
1816 | self.index.clearcaches() |
|
1819 | self.index.clearcaches() | |
@@ -3502,10 +3505,8 b' class revlog:' | |||||
3502 | self._docket.write(transaction, stripping=True) |
|
3505 | self._docket.write(transaction, stripping=True) | |
3503 |
|
3506 | |||
3504 | # then reset internal state in memory to forget those revisions |
|
3507 | # then reset internal state in memory to forget those revisions | |
3505 | self._inner._revisioncache = None |
|
|||
3506 | self._chaininfocache = util.lrucachedict(500) |
|
3508 | self._chaininfocache = util.lrucachedict(500) | |
3507 |
self._inner. |
|
3509 | self._inner.clear_cache() | |
3508 | self._inner._segmentfile_sidedata.clear_cache() |
|
|||
3509 |
|
3510 | |||
3510 | del self.index[rev:-1] |
|
3511 | del self.index[rev:-1] | |
3511 |
|
3512 |
General Comments 0
You need to be logged in to leave comments.
Login now