diff rust/hg-cpython/src/revlog.rs @ 51197:4e6620b7fbbb

rust-index: support cache clearing I'm not 100% sure how useful it is outside of perf, but it's still worth implementing.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 30 Oct 2023 10:34:48 +0100
parents f95f70cf2ee2
children 51cc12158f97
line wrap: on
line diff
--- a/rust/hg-cpython/src/revlog.rs	Thu Jun 29 11:37:19 2023 +0200
+++ b/rust/hg-cpython/src/revlog.rs	Mon Oct 30 10:34:48 2023 +0100
@@ -205,6 +205,7 @@
         self.nt(py).borrow_mut().take();
         self.docket(py).borrow_mut().take();
         self.nodemap_mmap(py).borrow_mut().take();
+        self.index(py).borrow_mut().clear_caches();
         self.call_cindex(py, "clearcaches", args, kw)
     }