Mercurial > public > mercurial-scm > hg
comparison rust/hg-cpython/src/revlog.rs @ 51194: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 |
comparison
equal
deleted
inserted
replaced
51193:f95f70cf2ee2 | 51194:4e6620b7fbbb |
---|---|
203 /// It is Python's responsibility to call `update_nodemap_data` again. | 203 /// It is Python's responsibility to call `update_nodemap_data` again. |
204 def clearcaches(&self, *args, **kw) -> PyResult<PyObject> { | 204 def clearcaches(&self, *args, **kw) -> PyResult<PyObject> { |
205 self.nt(py).borrow_mut().take(); | 205 self.nt(py).borrow_mut().take(); |
206 self.docket(py).borrow_mut().take(); | 206 self.docket(py).borrow_mut().take(); |
207 self.nodemap_mmap(py).borrow_mut().take(); | 207 self.nodemap_mmap(py).borrow_mut().take(); |
208 self.index(py).borrow_mut().clear_caches(); | |
208 self.call_cindex(py, "clearcaches", args, kw) | 209 self.call_cindex(py, "clearcaches", args, kw) |
209 } | 210 } |
210 | 211 |
211 /// return the raw binary string representing a revision | 212 /// return the raw binary string representing a revision |
212 def entry_binary(&self, *args, **kw) -> PyResult<PyObject> { | 213 def entry_binary(&self, *args, **kw) -> PyResult<PyObject> { |